[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: converting to an <ol>
The following is your solution
1. create a File in your system called entityref.dtd and define all the entities you want to use in that( in your specific case you may want to use the space. this would eleminate your definition of entities in the XSL Code) so your file would have a definition of space <!ENTITY space " " ><!-- space --> 2. now refer to this file in your doctype definition of your XSL file The following is the XSL Code <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet SYSTEM "d:\entityref.dtd"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="/"> <xsl:for-each select="//seqlist/item"> <xsl:for-each select="ancestor::seqlist"> <!--to count the no of spaces --> <xsl:if test="not(position() = 1)"> <!-- This is to make sure that the first parent set of elements starts without space and the subsequent children wil have space based on the positiuon of the element.. that is.. if it is 3rd child you have NoOfSpaces*3 no of spaces.. where noOfSpaces is the indent length unit . here will have 12 spaces as one Indent Unit --> &space;&space;&space;&space;&space;&space;&space;&space;&space;&space;&space;&space; </xsl:if> </xsl:for-each> <xsl:number count="item" format="1" level="multiple"/><xsl:value-of select="text()"/><br></br> </xsl:for-each> </xsl:template> </xsl:stylesheet> I have tested this with XALAN . and it works. HOPE THIS HELPS Vasu From: "Roman Huditsch" <roman.huditsch@xxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: converting to an <ol> Date: Fri, 14 Jun 2002 11:05:00 +0200 _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.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
|