Subject: [xsl] inserting tabs From: oryann9 <oryann9@xxxxxxxxx> Date: Wed, 12 Mar 2008 17:30:24 -0700 (PDT) |
Hello all, I searched through the archives and found some relevant data however I am still "missing the boat." I am having xml do the inserting of tab in my xml output but rather should have xsl insert tabs into my xml output. I am a newbie and this is a question for my online class. How do I insert tabs after each entry in my xsl code? For example, Jeff Peng thank you In my xml DTD doc I declare an entity like so: <!DOCTYPE CONTACTS [ <!ENTITY tab "	"> <snip> <!-- Begin XML data --> <pre> <CONTACTS> <PERSON> <FIRSTNAME>Jeff</FIRSTNAME> <LASTNAME>Peng</LASTNAME> <snip> <!-- Begin XSL code --> <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <!-- This for-each outputs the links to below --> <xsl:for-each select="//PERSON"> <xsl:value-of select="LASTNAME"/> <xsl:value-of select="FIRSTNAME"/> <xsl:choose> <xsl:when test="string-length(PHONE) < 1"> <xsl:text>No Data present</xsl:text> </xsl:when> <xsl:otherwise> <xsl:attribute name="fname">Arial</xsl:attribute> <xsl:attribute name="size">5px</xsl:attribute> <xsl:value-of select="PHONE"/><space/><xsl:value-of select="PHONE/@TYPE"/> </xsl:otherwise> </xsl:choose> <xsl:value-of select="WORKADDR"/> <xsl:value-of select="EMAIL"/> <xsl:value-of select="TIMEZONE"/> <xsl:value-of select="OTHERINFO"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Count preceding cousins a, Michael Kay | Thread | RE: [xsl] inserting tabs, Michael Kay |
Re: [xsl] Slow XSLT, Cleyton Jordan | Date | Re: [xsl] Slow XSLT, David Carlisle |
Month |