Subject: Re: [xsl] WordML to XML From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Sat, 12 Feb 2005 11:18:52 +0100 |
Joris, et al...
My requirement is specifically to convert wordML to xml. i.e. strip off the "wordML" specific tags, but retain the "formatting instructions".
<xsl:template match="w:wordDocument"> <vasuarticletag> <xsl:apply-templates select=".//w:body"/> </vasuarticletag> </xsl:template>
<xsl:template match="w:r "> <xsl:apply-templates select="(w:rPr|w:t)[1]" mode="styling"/> </xsl:template>
<xsl:template match="w:rPr" mode="styling"> <xsl:apply-templates select="*[1]" mode="styling"/> </xsl:template>
<vasuarticletag> <b> <i> <u> I have bold, italics and underscore </u> </i> </b> </vasuarticletag>
done.So, I need help in writing an xslt which will 1. traverse through every "w:r" block.
possible, but not necessary.2. Look for "w:rPr" tags with "w:i", "w:b" , "w:u" children.
This is not the way XSLT works. In XSLT you construct elements, which are added to the result tree. When the XSLT processing is done, a serializer outputs these elements as tags.3. If they exist, output <i>, <b>, <u> tags, then output the contents of the corresponding "w:t" block and then close the <i>, <b>, <u> tags.
regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) Gaudiam omnibus traderat W3C, nec vana fides
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] WordML to XML, Vasu Nanjangud | Thread | RE: [xsl] WordML to XML, Touchtel |
Re: [xsl] Summing grouped elements, Mukul Gandhi | Date | Re: [xsl] Understanding Identity Tr, Joris Gillis |
Month |