[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Joining sibling elements
Joris Gillis napisaE(a):
Tempore 19:49:30, die 08/10/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Marcin MiEkowski <milek_pl@xxxxx>: Thanks, I'll try to extend it to my WordML scenario (your version seems to destroy the format and the most annoying parts are still there). See a sample of the WordML: <w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>It</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>is</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>an</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>honour</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>to</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>be</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>here</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>in</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>the</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>European</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>Parliament</w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t> </w:t></w:r><w:r><w:rPr><w:sz w:val="27"/></w:rPr><w:t>today.</w:t></w:r> It is a single sentence, and the translator is supposed to translate it not in MS Word, but in kind of a specialized XML editor with tags visible. The problem is that the task is to join elements <w:t> so the challenge is not really to join immediate siblings but to join (you might say "compress") same groups of tags to make <w:t> enclose more text. If I understand WordML specs the task would be to join <w:t> under the condition that <w:r> enclosing adjacent <w:t> elements contains same formatting tags. But from your answer I see that this is possible using XSLT (that was my original question) although because of the recursion involved the processing would probably take some time. Thanks again, Marcin
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|