[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] dl/dt/dd matching
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|