This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: (text processing) lexical context
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 24 Apr 2002 08:45:56 +0100
- Subject: RE: [xsl] (text processing) lexical context
- Reply-to: xsl-list at lists dot mulberrytech dot com
Show us your code and we'll tell you why it's not working...
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Nicolas
> Mazziotta
> Sent: 24 April 2002 07:29
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] (text processing) lexical context
>
>
> Hello,
>
> I'm working with xsl to process marked-up text for linguistic purpose.
> The current aim is to generate lists that extract some
> elements and its
> current context.
>
> e.g.
>
> <root>
> This is the <w>first</w> <i>sentence</i>. This is the <w>second</w>
> <i>sentence</i>. This is the <w>third</w> <i>sentence</i>.
> </root>
>
>
> would be formatted so that the list would look like:
>
> <html>
> <ol>
> <li>first: This is the <b>first</b> <i>sentence</i>.
> <li>Second: This is the <w>second</b> <i>sentence</i>.
> <li>Third: This is the <b>third</b> <i>sentence</i>.
> </ol>
> </html>
>
> But I can't figure out how I can select the text surrounding the <w>
> element without using <xsl:value-of.../>, which does not allow me to
> process the following <i> element...
>
> i.e., I get
>
> <html>
> <ol>
> <li>first: This is the <b>first</b> sentence.
> <li>Second: This is the <w>second</b> sentence.
> <li>Third: This is the <b>third</b> sentence.
> </ol>
> </html>
>
> and the <i> element is lost...
>
> And I can't do <xsl template match="substring(...)"> because substring
> is not a DOM node.
>
> Help: is there a way to process substrings or stg?
>
> N. Mazziotta
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list