XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Posttop
Vinoth VSubject: WORDML list to XML list
Author: Vinoth V
Date: 31 Dec 2008 04:36 AM
Originally Posted: 31 Dec 2008 04:35 AM
Hi

Please anyone can help me on this.

How to convert WORDML list to normal list.
If word containing one list it is very easy to convert as xml list.
But if is containing list within list it is not converting.

Create a word style name as list-bullet.

Normal list conversion XSLT code

<xsl:template match="w:p/w:pPr/w:pStyle/@w:val='list-bullet'[not(preceding-sibling::*[1][self::w:p/w:pPr/w:pStyle/@w:val='list-bullet;])]" mode="group">
<xsl:choose>
<xsl:when test="preceding-sibling::*[1][not(self::w:p/w:pPr/w:pStyle/@w:val='list-bullet)]">
<list>
<xsl:attribute name="type">
<xsl:value-of select="w:pPr/w:pStyle/@w:val"/>
</xsl:attribute>
<xsl:apply-templates select='.' mode='listbull'/>
</list>
</xsl:when>
</xsl:choose>
</xsl:template>

<xsl:template match='*' mode='listbull'/>

<xsl:template match='w:p/w:pPr/w:pStyle/@w:val='list-bullet'' mode='listbull'>
<item>
<xsl:apply-templates select="w:r"/>
</item>
<xsl:apply-templates select='following-sibling::*[1]' mode='listbull'/>
</xsl:template>

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.