Subject: RE: cdata, grouping and upconversion
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 11 Dec 2004 15:16:07 -0000
|
This doesn't feel like a grouping problem to me. It's just tokenizing, using
a newline character as the token separator. Use any of the usual
tokenization methods:
tokenize() in XPath 2.0
str:tokenize() in EXSLT
tokenize in FXSL
recursive named templates using substring-before/substring-after in XSLT 1.0
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Bruce D'Arcus [mailto:bdarcus@xxxxxxxxxxxxx]
> Sent: 11 December 2004 15:09
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: cdata, grouping and upconversion
>
> I'm converting presentation documents out of the (really
> ugly!) Keynote
> format into something cleaner using XSLT 2.0. How I do convert the
> following into proper paragraphs???
>
> <notes font-color="0 0 0" paragraph-head-indent="18"
> paragraph-alignment="left"
> tab-stops="L 18 L 28 L 56 L 84 L 112 L 140 L 168 L
> 196 L 224 L
> 252 L 280 L 308 L 336"
> font-size="12" paragraph-line-spacing="0.4"
> font-name="Times-Roman">
> <div paragraph-spacing="2.32"><![CDATA[Here's one paragraph
> stuck in CDATA.
>
> Here's another; separated by a newline.]]></div>
> </notes>
>
> I realize I want to use grouping, but how should I use it here?
>
> Output should be:
>
> <notes>
> <para>Here's one paragraph stuck in CDATA.</para>
> <para>Here's another; separated by a newline.</para>
> </notes>
>
> Bruce
|