-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
egXML needs a way to highlight renditional aspects in the example #1632
Comments
I had no idea this was in the Guidelines. It makes no sense whatsoever. You could specify a namespace if you want to (putting the rend attribute explicitly in the examples namespace) by using a prefix, but why? I wonder if there's something specific about the way the Stylesheets handle egXMLs which is based on the rend att? |
I remember this. It was to enable rendering of particular bits of egxml. For example making the element you were taking about in the middle of a larger worked example display as bold. Or other rendition things like that. But also because the xml example might have rendering in the source you want to preserve. All the elements in the egxml are in the examples namespace. I think the idea was that putting rend into the tei namespace (since tei attributes are in the null namespace). |
@jamescummings your last sentence is unusually gnomic. Did something drop off? |
@jamescummings to investigate what the current stylesheets do with |
I investigated this and although I have memories and emails with Sebastian about it working, none of that seems to be in the current Stylesheets. It might have been in a different profile. Or he removed it later. So I've investigated and current stylesheets do nothing. The question is I guess, whether we should enable some mechanism like this in the stylesheets. The idea is that you have an egXML in some TEI document that is making a point about a particular element and you want to make that particular element (say) bold to highlight it in your output. If not something like this, does someone have a suggestion as to how properly to format particular aspects of egXML content? My assumption is that the use-case is clear enough and completely reasonable: You are showing examples of XML and want to highlight one or other bit in some way. That seems reasonable and pedagogically useful to me. Is there a better way to address and record formatting of particular parts of an egXML? |
Removing Status: Go since I've done the investigation, as above. I've commented out the misleading prose in the egXML spec file for now. My memory must have been as a local customisation. So my questions are:
|
Some thoughts jump to mind: We sort of already have a mechanism for the former, maybe. What would <rendition xml:id="duck" selector="teix|egXML teix|persName">font-weight:bold;</rendition>
<!-- ... -->
<teix:egXML rendition="#duck">
<teix:p>Hi <teix:persName>James</teix:persName>!</teix:p>
</teix:egXML> mean? Another thought is that, for the demo case, it would be nicer to be able to use XPath directly on the <teix:egXML highlight="teix:p/teix:persName/@ref">
<teix:p>Hi <teix:persName ref="#JC">James</teix:persName>!</teix:p>
</teix:egXML> indicates (as a hint to the processor, of course, not a requirement) that only the Another way of handling this whole problem, which I raised a decade or so ago, is to allow |
Hi @sydb, If I summarise your suggestions they are basically a) As you note this is sort of saying that all persNames in egXML should be bold, when really we want just one in this particular example, or indeed say its ref attribute. Also there is the fact that rendition is about the source document, and patently really people would be using this for creating new teaching materials and say the Guidelines themselves Of all of these I like b the best because it gives flexibility. but think it is the wrong way round. What about something-like-rendition but with a context attribute that enables you to give an xpath to what it applies? (Or I suppose the highlight attribute on egXML you suggest but to use it you are required to also point to a rendition-like element giving how it is highlighted. After all, we just don't want them to be bold, but in one example this one bold, the other underlined, and another one shaded with a light blue background... or something. |
OK. So, based on what I think you’re thinking I’m now thinking of something like a new I like it because it is very powerful (
Since I want to be able to highlight sub-units of the XSLT document model nodes (e.g. delimiters, pseudo-attributes, and most importantly tags), an XSLT solution is quite difficult to come by. |
Hi @sydb, I agree that this would be powerful and flexible, but has the problems you mention. So we're agreed that it would be good to be able to highlight arbitrary portions of egXML elements and these are well-described by an XPath pattern. Instead of a renditionMatch attribute I was thinking one needs a new grouping element which then allows zero-or-more renditionMatch (or whatever) elements to address multiple parts of their sibling egXML. Perhaps exemplum could be repurposed for this to contain an egXML and a series of these new elements that link an XPath with a particular rendition id. Just thinking out loud... |
Council likes the idea, but probably doesn't have time to work on this for a while. Low priority. Note: we don't know a good mechanism to implement the range of highlighting we envision yet. Suggestion c) above is probably the easiest to implement. |
c.f. #1928 may be a duplicate of this. While both are low priority we certainly need the ability to mark arbitrary string-lengths inside egXML, but most often this would be known XML parts. A combination of standoff xpointer and standoff byte-offset might be the ideal approach. See that ticket. |
F2F Council (with guest @jamescummings) is generally in favour of the idea and decided that he will come up with a proposal. |
ping @jamescummings |
What exactly does this mean? TEI attributes are not in any namespace, so I don't see how you can specify one. The example following this text doesn't help, since it doesnt show any namespaces at all. (And it has an error
should read "... were rendered" I assume.
The text was updated successfully, but these errors were encountered: