- From: Shaun McCance <shaunm@gnome.org>
- Date: Mon, 09 Jul 2012 14:33:05 -0400
- To: public-multilingualweb-lt@w3.org
On Mon, 2012-07-09 at 17:20 +0200, Yves Savourel wrote: > Hi all, > > I have the action item to summarize the status of the targetPointer > requirements > This related to ISSUE-15. > > The current requirement > (http://www.w3.org/International/multilingualweb/lt/wiki/Requirements#targetPointer) outlines several use cases. [snip] > Shaun was illustrating his thoughts with: > > selector="//license[@xml:lang='en']" repeatable="yes" For the benefit of anybody else reading, I want to clarify that I'm approaching this purely from the angle of constructing multilingual documents. I don't personally have any need for identifying targets in existing multilingual files. > To describe a case like this: > > <application> > <license xml:lang="en"> > <p>This is the license.</p> > <p>It has multiple paragraphs.</p> > </license> > <license xml:lang="de"> > <p>Dies ist die Lizenz.</p> > <p>Es verfügt über mehrere Absätze.</p> > </license> > </application> > > Such notation however: > > a) It would not work for cases where the target(s) are in non-sibling > nodes. > > b) It would work only if the document uses xml:lang to distinguish > the different language blocks (as it is the only implicit difference > one can make in the example). Both true. I have existing functionality that shares these limitations and has its own extra limitation: in the case above, the <p> elements would be repeated, unless <p> was marked as withinText=yes. > <application> > <src> > <license> > <p>This is the license.</p> > <p>It has multiple paragraphs.</p> > </license> > </src> > <targets> > <target langCode='1'> > <license> > <p>Dies ist die Lizenz.</p> > <p>Es verfügt über mehrere Absätze.</p> > </license> > </target> > </targets> > </application> > > Or, more simply, for bilingual cases where the content is a single > element: > > <msgs> > <m id='1'> > <src>Text of the message</src> > <trg>Texte du message</trg> > </m> > </msgs> > > So, I think an XPath relative expression would be more flexible > because it would allow both use cases: > > <its:targetPointerRule "//license[@xml:lang=$SourceLang]" > targetPointer="../license[@xml:lang=$Target]"/> > > <its:targetPointerRule "//src" > targetPointer="../targets/target[@langCode=$TargetCode]"/> > > However, this method has also a possible drawback: like with Shaun's > example, with more complex expressions creating the target node if it > does not exist, may be complicated. Here's a concrete example of an expression I can't do anything with: targetpointer="../*[local-name(.)!='src']/*[@langCode]" Even with the example you gave, which I could parse, I'd have to make some assumptions. Does <targets> come before or after <src>? Does each <target> get its own <targets>, or are they all under one <targets>? And if I'm not using xml:lang, what am I using, and how do I construct the values? > I wonder if then the data category scope could be limited to work, at > least, with existing nodes? I think we're looking at two very different sides of the same coin. Unfortunately, I can't think of anything that solves both problems well. The existing targetPointer proposal looks very sane for what you're trying to do. -- Shaun McCance Community Help Expert | Open Help Conference http://syllogist.net/ | http://openhelpconference.com/
Received on Monday, 9 July 2012 18:33:29 UTC