[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hi, Andy,
You're on the right track with for-each-group. For some of my customers, I transform WordML into other kinds of XML. I have wound up with xsl:for-each-group nested 6 deep within the same template (to handle the document's headers) and further uses of xsl:for-each-group in templates that get called from there (to handle lists).
Also, the trick of generating implicit wrappers can help a lot. Check the following link for how to do that:
http://www.xslt.com/html/xsl-list/2005-08/msg01085.html
HTH
----- Original Message ----- From: "Andy Carr1" <CARRA@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, February 20, 2007 6:25 AM
Subject: [xsl] MSXML w:p tag causing problems
Re: [xsl] MSXML w:p tag causing problems
Subject: Re: [xsl] MSXML w:p tag causing problems From: "Jay Bryant" <jay@xxxxxxxxxxxx> Date: Tue, 20 Feb 2007 10:57:12 -0600 |
Hi, Andy,
You're on the right track with for-each-group. For some of my customers, I transform WordML into other kinds of XML. I have wound up with xsl:for-each-group nested 6 deep within the same template (to handle the document's headers) and further uses of xsl:for-each-group in templates that get called from there (to handle lists).
Also, the trick of generating implicit wrappers can help a lot. Check the following link for how to do that:
http://www.xslt.com/html/xsl-list/2005-08/msg01085.html
HTH
Jay Bryant Bryant Communication Services
----- Original Message ----- From: "Andy Carr1" <CARRA@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, February 20, 2007 6:25 AM
Subject: [xsl] MSXML w:p tag causing problems
Hi
I am constantly running into problems caused by the w:p MSXML Tag. The problem is that Word treats every text entry as a w:p and does not distinguish between Headers, Lists and any other type of textual entry... which is reeeaaally annoying.
When there are a number of list items in Word you get something like this:
<w:p> <w:pPr> <w:pStyle w:val="ListTextStyle" /> <w:listPr> <wx:t wx:val="1." /> <wx:font wx:val="Times New Roman" /> </w:listPr> </w:pPr> <w:r> <w:t>Some text</w:t> </w:r> </w:p> <w:p> <w:pPr> <w:pStyle w:val="ListTextStyle" /> <w:listPr> <wx:t wx:val="2." /> <wx:font wx:val="Times New Roman" /> </w:listPr> </w:pPr> <w:r> <w:t>Some more text</w:t> </w:r> </w:p> ... and so on ..
Now my problem is I need to group these type of lists under a single <List> tag so I would get something like this:
<List> <ListItem>Some text</ListItem> <ListItem>Some more text</ListItem> </List>
In theory I could use the <xsl: for-each-group> function to do the job, but the added complication is that I am already using this function to group another w:p tag further up the node tree which is a Heading and the w:p list items are children of this Heading.
The <xsl:for-each-group> used for the Heading, processes it children by <xsl:apply-templates select="current-group" /> and I only want to create the <List> tag once for the first w:p list item but not for successive ones.
So I can't find a way of solving this problem without creating a <List> tag for every w:p list item.
Can anyone help......PLEASE...
Regards Andy
Andy Carr IT Specialist Tel: Internal - 298037 External - 01252 558037 Mail Point M1C IBM Application Services Meudon House, Meudon Avenue, Farnborough, GU14 7NB (Notes) Andy Carr1/UK/IBM@IBMGB (Internet)CARRA@xxxxxxxxxx
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] MSXML w:p tag causing problem, Andy Carr1 | Thread | [xsl] job for xsl:key? (XSL 1.0 que, Steve |
Re: [xsl] job for xsl:key? (XSL 1.0, David Carlisle | Date | Re: [xsl] job for xsl:key? (XSL 1.0, Mukul Gandhi |
Month |