|
Subject: Re: Creating a batch file or shell script / Inserting line breaks From: Paul Tchistopolskii <paul@xxxxxxx> Date: Sun, 09 Jul 2000 16:56:05 -0700 |
> 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"/>
If he *does not* provide indent="yes". I was of course
assuming that there is no 'indent'.
> 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.
... when indent is specified. If indent is *not* specified there should be
no difference in outputing
<xsl:text>
</xsl:text>
by HTML handler or Text handler or XML handler.
Rgds.Paul.
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:value-of select="'AAA'"/>
<xsl:text> </xsl:text> <!-- try removing this -->
<xsl:value-of select="'BBB'"/>
</xsl:template>
</xsl:stylesheet>
BTW - if specifying
<xsl:output method="txt"/>
XT silently assumes it was 'xml'. ;-)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Creating a batch file or shell , Mike Brown | Thread | Re: Creating a batch file or shell , Mike Brown |
| Re: Creating a batch file or shell , Ragnar Schierholz | Date | RE: asp assistance please, Pawson, David |
| Month |