Nathan --

You haven't shown where you're getting the OutputProperties from or
exactly what sort of conditional processing you're trying to do.  Since
there is no xsl:output element, the properties switch has to occur at
run time once the output can be examined after the transform is
completed.

We'll need a fuller description of what you're trying to do before we
can intelligently address you're question.  XalanJ 2.2 should be working
fine in this regard, I believe.

Gary

> -----Original Message-----
> From: Beyer,Nathan [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 22, 2002 9:47 AM
> To: Xalan-J-User (E-mail)
> Subject: Default Output Method in Xalan 2.2
> 
> 
> 
> I'm using Xalan 2.2 do some transforming and I'd like to use 
> the Output Properties to do some conditional processing, but 
> have noticed that the default properties don't map up to the 
> XSLT specification.
> 
> According to the specification, if the following is true, 
> then the default "method" should be "html".
> *     the root node of the result tree has an element child,
> *     the expanded-name of the first element child of the 
> root node (i.e.
> the document element) of the result tree has local part html 
> (in any combination of upper and lower case) and a null 
> namespace URI, and
> *     any text nodes preceding the first element child of the 
> root node of
> the result tree contain only whitespace characters,
> I'm not finding this to be the case in Xalan 2.2. It seems to 
> always default to "xml".
> 
> Here's the XSL I'm using to construct my transformer with:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>       <xsl:template match="/">
>               <html>
>                       <body>
>                               Writing some information.
>                       </body>
>               </html>
>       </xsl:template>
> </xsl:stylesheet>
> 
> Here's a list of all the properties and there values (these 
> are the defaults, since I'm not setting anything):
> -- listing properties --
> method=xml
> encoding=UTF-8
> omit-xml-declaration=no {http://xml.apache.org/xslt}indent-amount=0
> indent=no
> standalone=no 
> {http://xml.apache.org/xslt}content-handler=org.apache.xalan.s
erialize.Seria
lizer...
{http://xml.apache.org/xslt}entities=org/apache/xalan/serialize/XMLEntit
ie..
.
version=1.0
media-type=text/xml


The odd part is that according to these properties, it should be
outputting an XML document with an XML declaration, but the output is
coming out as though the default "method" is "html".


Does anyone know if this is a known issue or if it's fixed in a later
version?

Thanks.
---
Nathan Beyer

Reply via email to