Subject: dl/dt/dd matching From: Francois Belanger <francois@xxxxxxxxxxx> Date: Mon, 11 Jan 99 18:12:31 -0500 |
I'm scratching my head on this one. We are trying to define an XML content DTD and giving a shot to Voyager, the W3 effort for reinstating HTML 4 as an XML application see <http://www.w3.org/TR/WD-html-in-xml/>. What were trying to do is layout a suite of dt/dd within a dl as a table with a row for each dt. Since there's no container for each dt (the corresponding dl are siblings, not children of the dt node), how can one start a new row for each dt and express that in XSL? Speicifcally, any suggestion on xsl:templates for turning: <dl> <dt>Term 1</dt> <dd>Description 1</dd> <dt>Term 2</dt> <dd>Description 2</dd> </dl> into: <TABLE> <TR> <TD>Term1</TD> <TD>Description 1</TD> </TR> <TR> <TD>Term2</TD> <TD>Description 2</TD> </TR> </TABLE> Our current templates (which obviously do not produce the desired result): <xsl:template match="dl"> <TABLE> <xsl:apply-templates/> </TABLE> </xsl:template> <xsl:template match="dl/dt"> <TR> <TD><xsl:value-of select="."/></TD> <TD<xsl:apply-templates select = "../dd"></TD> </TR> </xsl:template> <xsl:template match="dl/dd"> <TD><xsl:apply-templates/></TD> </xsl:template> Any suggestion or comment welcome! Francois Belanger Sitepak, Bringing Internet Business into Focus http://www.sitepak.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XSL editor ????, Tony Graham | Thread | Re: dl/dt/dd matching, James Clark |
Re: Standard API to XSL processors, Paul Prescod | Date | Re: Standard API to XSL processors, James Clark |
Month |