Parsing complex line (mixed text and markup)
Hello experts, I'm using xslt 2.0 processor both saxon and and altova. I'm trying to parse complex line like: <tbentry>Some text, Some more text <xref linkend="somelink"> even more text , , ,</tbentrys> and get following output : <row> <entry>Some text</entry> <entry>Some more text <xref linkend="ut_man_related_docs"> and even more text </entry> </row> Number of entries is not constant. I have easily find the solution of this without mixing the text and markup by using tokenize function. But failed to separate text and markup using this approach. Example can be found here : http://pastebin.com/m40fd204f To formalize the goal: I want to simplify life of our tech writes by creating wrappers on top of DocBook that will help transform from my defined syntax to standard Docbook code. So if there is another more appropriate way (which is not WYSIWYG editor) to achieve this, i can completely change the source line: <tblrow>Some text, Some more text <xref linkend="somelink"> even more text </tblrow> as soon as it's still easy to write :) The only solution i found is pass linkend entry as an attribute to tblrow and another attribute which will specify the entry number. But this is very limited solution and will not allow me to use xref in 2 entries for example. Additional note, I'm absolutely newby in XML. Thanks in advance, Ilya.
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