[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Text file Indentation
Subject: Re: [xsl] Text file Indentation From: "cutlass" <cutlass@xxxxxxxxxxx> Date: Tue, 12 Feb 2002 09:50:38 -0000 |
from my experience each parser is different with respect to how it handles indentation. Also not to mention that indentation, within the XSLT spec, is scant at best. I would suggest using something like HTML tidy ( www.w3.org ) as a post processing step. chow, jim fuller ----- Original Message ----- From: "Yoav Broudo" <yoav@xxxxxxxxx> To: "Xsl-List (E-mail)" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, February 12, 2002 7:45 AM Subject: [xsl] Text file Indentation > Hi, > I am outputting my XSL as text and I need to Indent is as the example bellow. > How can I achieve Indentation in a Text format. > I am trying to use the <xsl:output method="text" indent="yes"/> but it seems like the parser > ignore the Indent keyword. > > Thanks in advance > Yoav > > > I am using the following XSL: > > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method="text" indent="yes"/> > <xsl:template match="USER"> > <document> > Hi <xsl:value-of select="@USER_NAME"/>
 <!-- CR --> > We have the following postings.... > 
 <!-- CR --> > <xsl:for-each select="CATEGORY"> > <xsl:number count="CATEGORY"/>. <xsl:value-of select="@TITLE"/> (http://mysite.com/document.aspx?id=<xsl:value-of select="@ID"/>) > <xsl:for-each select="CONTENT_ITEM"> > <xsl:number count="CONTENT_ITEM" format="a"/>. <xsl:value-of select="@TITLE"/> (http://mysite.com/document.aspx?document=<xsl:value-of select="@ID"/>) > </xsl:for-each>
 <!-- CR --> > </xsl:for-each> > Regardsss > Administrator > </document> > </xsl:template> > </xsl:stylesheet> > > > The Output should look like: > > Hi Joe > > We have the following postings... > > 1. Post A (http://mysite.com/document.aspx?id=1) > a. Subject A (http://mysite.com/document.aspx?document=1) > > 2. Post B (http://mysite.com/document.aspx?id=5) > a. Subject B (http://mysite.com/document.aspx?document=45) > b. Subject D (http://mysite.com/document.aspx?document=10) > c. Subject F (http://mysite.com/document.aspx?document=11) > d. Subject G (http://mysite.com/document.aspx?document=12) > > 3. Post C (http://mysite.com/document.aspx?id=6) > a. Subject A (http://mysite.com/document.aspx?document=13) > b. Subject C (http://mysite.com/document.aspx?document=15) > c. Subject E (http://mysite.com/document.aspx?document=16) > > 4. Post D (http://mysite.com/document.aspx?id=7) > a. Subject D (http://mysite.com/document.aspx?document=14) > > > Regardsss > MFA Administrator > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Text file Indentation, Peter Davis | Thread | [xsl] PDF security, |
Re: [xsl] Text file Indentation, Peter Davis | Date | [xsl] PDF security, |
Month |