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

Re: what are node set fragments and why are they ruining my

Subject: Re: what are node set fragments and why are they ruining my life?
From: Phil Lanch <phil@xxxxxxxxxxxxxxx>
Date: Thu, 16 Dec 1999 10:36:07 +0000
entity fragments
whoops - what I wrote was complete rubbish, because it would require an
XSLT processor to (sometimes) keep the entire result tree in memory and
only write it out when it's finished processing - which is surely meant
to be avoided in XSLT: the idea is that the whole input tree is held in
memory[1], but the output tree is written out as a stream as you go
along. that means that the stylesheet writer asks for a standalone
document declaration at their own risk: if the output turns out not to
be a wf document, it won't be a wf external entity either.

not satisfactory.

Me wrote:
> 
> Kay Michael wrote:
> >
> > I'm hitting a few other problems in the area of output XML not needing to be
> > a well-formed document, e.g. when calling a DocumentHandler to process the
> > output, or when chaining it into another stylesheet. (The contract with a
> > SAX DocumentHandler of course says that the sequence of events will always
> > be well-formed). It's an area where the spec seems a bit vague, e.g. it
> > seems perfectly possible to output
> >
> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > <element1/>
> > <element2/>
> >
> > which is neither a well-formed document nor a well-formed external entity.
> 
> an external parsed entity (http://www.w3.org/TR/REC-xml#NT-extParsedEnt)
> may begin with a text declaration, which is like an xml declaration
> except that it can't include a standalone document declaration. so your
> example would be a well-formed external entity if you left the
> standalone document declaration out. I think the spec -
> 
> "The xml output method should output an XML declaration unless the
> omit-xml-declaration attribute has the value yes. The XML declaration
> should include both version information and an encoding declaration. If
> the standalone attribute is specified, it should include a standalone
> document declaration with the same value as the value as the value of
> the standalone attribute. Otherwise, it should not include a standalone
> document declaration; this ensures that it is both a XML declaration
> (allowed at the beginning of a document entity) and a text declaration
> (allowed at the beginning of an external general parsed entity)." [16.1]
> 
> - is _trying_ to say that you should leave it out when the output can't
> be a document - though it's _actually_ saying you should leave it out
> when the xsl:output element has no standalone attribute. Since that
> contradicts the spec's own statement that the output should be either a
> well-formed document or a well-formed external entity, presumably you're
> entitled to pick the more sensible of the contradictory statements.

-- 

cheers

phil

"that monotonous state of the soul halfway between fulfillment
and futility which comes with life in the country" --- Musil

[1] unless that is optimized away for simple stylesheets, or replaced
with a multi-pass streaming strategy


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


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.