[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Dynamic output method

Subject: Re: Dynamic output method
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Sat, 12 Feb 2005 14:31:30 -0700
jaxp output
Good Answer!  Thanks : )


On Sun, 13 Feb 2005 08:21:26 +1100, Dimitre Novatchev
<dnovatchev@xxxxxxxxx> wrote:
> Karl,
> 
> Even in XSLT 1.0 there's a way to get either
>   method="xml"
> or
>   method="html"
> 
> If a value for the "method" attribute is not explicitly specified and
> the generated top element by the transformation is with local-name
> "html", then the method used for serialisation will be "html",
> otherwise it will be "xml"
> 
> From the XSLT 1.0 specification (http://w3.org/TR/xslt#output):
> 
> "The default for the method attribute is chosen as follows. If
> 
> 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,
> 
> then the default output method is html; otherwise, the default output
> method is xml. The default output method should be used if there are
> no xsl:output elements or if none of the xsl:output elements specifies
> a value for the method attribute"
> 
> Cheers,
> Dimitre Novatchev
> 
> 
> On Sat, 12 Feb 2005 10:55:22 -0700, Karl Stubsjoen <kstubs@xxxxxxxxx> wrote:
> > How abaout with MSXML and Ver. XSL 1.1?
> >
> >
> > On Sat, 12 Feb 2005 08:52:55 -0000, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > > >
> > > > Is there a way to dynamically set the xsl:output method?  I'd like to
> > > > programmitcally set the output for HTML and/or XML.
> > > >
> > >
> > > Many APIs (e.g. JAXP) allow you to set the serialization parameters from the
> > > calling application.
> > >
> > > In 2.0 you can use xsl:result-document which allows dynamic serialization
> > > parameters.
> > >
> > > Michael Kay
> > > http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.