Definition List creation

babenis

New Member
Trying to create a definition list in my XML using XSLT. Here is an illustration of what my input looks like:\[code\] <p> <i>word1</i> definition text here <br /> <br /> <i>word1</i> definition text here <br /> <br /> <i>word1</i> definition text here <br /> <br /> <i>word1</i> definition text here <br /> <br /> <i>word1</i> definition text here <br /></p>\[/code\]the "definition text here" in the above XML are un-tagged text nodes that I want to tag and include in my output. An illustration of the output I want is below:\[code\]<dl> <di> <dt>word1</dt> <dd>definition text here<dd> <di><dl>\[/code\]My template so far that is not working:\[code\]<xsl:template match="p"> <dl> <dt> <xsl:value-of select="./i/node()"/> </dt> <dd> <xsl:sequence select="./text()" /> </dd> </dl> </xsl:template>\[/code\]Anyone know a quick and easy way to do this?Thanks in advance.
 
Back
Top