This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XSL customization layer question


Bob Stayton came to the rescue with:

>>>>
Two things:

1.  The test attribute won't respond properly to '>';
you should use test="position() > 1".  Fun, huh?

<<<<

Oddly, it seems to have no trouble with the '>' in that position. It works
both ways. I replaced the '>' though.

>>>>
2.  If you are looking to output literal whitespace, then use
the <xsl:text> element:

<xsl:template match="cmdsynopsis">
   <xsl:if test="position() &gt; 1">
<xsl:text>
    </xsl:text></xsl:if>
   </xsl:if>
   <xsl-apply-templates/>
</xsl:template>

That's carriage return and four space characters
inside the <xsl:text> element.
<<<<

Okay, I figured the second </xsl:if> was a typo, and it worked. Then I
discovered I didn't need the four spaces, the carriage return occurs inside
of the indent and keeps the indent. Funny thing: the carriage return
doesn't seem to work unless I have a carriage return *and* at least one
space in between the xsl:text tags. Is there anything special I need to do
to get the carriage return to work without any spaces?

Thanks.


Dennis Grace

Information Developer
IBM Linux Technology & Solutions Center
(512) 838-3937  T/L 678-3937  cell: (512)-296-7830
dgrace@us.ibm.com

This sentence no verb.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]