Subject: Re: [xsl] analyze-string question From: Wendell Piez <wapiez@xxxxxxxxxxxxxxx> Date: Mon, 29 Oct 2012 14:05:17 -0400 |
Hi David, As Gerrit's response suggests, you have two separable problems here: 1. Parsing the plain text input and mapping it into XML 2. Properly interpreting your markup syntax given its semantic overloading of < and > (as both accent-indicators bound to the next character only, and start- and end-tags for "alt" segments). An EBNF or other formal language specification would help with both of these problems together, but short of that, it'll be easier to tackle if you separate them. Gerrit's idea of using the character following the < or > to disambiguate it is one approach. But you can only tell if it covers your case by looking at your actual data and rules. So, for example, you say DRUG<OJ MO <MS-P <P 3V>> should become DRUG<stress>O</stress>J MO <alt>MS-P <alt>P 3V</alt></alt> so how do we know it shouldn't be this? DRUG<alt>OJ MO <alt>MS-P <stress>P</stress> 3V</alt></alt> Cheers, Wendell -- Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] analyze-string question, Imsieke, Gerrit, le- | Thread | [xsl] analyze-string question, Birnbaum, David J |
Re: [xsl] Force the case of a set o, G. Ken Holman | Date | [xsl] [XPath 3.0] How to do partial, Costello, Roger L. |
Month |