[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Creating a batch file or shell script / Inserting line breaks


Subject: Re: Creating a batch file or shell script / Inserting line breaks
From: Mike Brown <mike@xxxxxxxx>
Date: Sun, 9 Jul 2000 15:08:07 -0600 (MDT)

Paul Tchistopolskii wrote:
> Something is already wrong with Xalan (  or with the bugreport  ), 
> because bugreport  says that 
> 
> >> Funnily enough, if I switch the output method to "html" I get separated lines, 
> >> but I get an extra blank line before and after every element, which
> >> causes two blank lines between the elements
> 
> That means Xalan's outputHandler for text is very different from 
> html. This is strange.

If he said

 <xsl:output method="html" indent="yes"/>

then you're right, this is strange. One would assume that without
indent="yes", no whitespace should be added, and we already know that the
non-xsl:text whitespace is stripped from the stylesheet, so the elements
should run right up against each other.

Here's something interesting, though.. an oversight in the XSLT spec:

"If the semantics of an attribute are not described for an output method,
then it is not applicable to that output method."

and guess what, the semantics of indent are not described for the html
output method; only the xml output method. That said, the spec also says:

"If an XSLT processor outputs the result tree, it should do so as
specified by the xsl:output element; however, it is not required to do
so."

So Xalan, XT, Saxon, etc. are not overstepping any bounds by making up
their own behavior for particular output methods.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords