This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XML string copying w/o d-o-e (was Re: Fixing <b>)


> Michael Kay wrote:
> > I think one could clean up the semantics to make it workable. I'm
> > thinking in terms of a facility that says "Here is some
> XML, represented as
> > unparsed text containing markup characters. I want this XML
> copied onto the
> > result tree. Conceptually, I want to parse the XML and copy
> the resulting
> > nodes to the result tree. But if the result tree is being
> serialized to XML,
> > I don't mind the processor being clever and bypassing the
> parse/serialize
> > operations by copying the raw XML straight to the serial
> output file."
>
> I don't see how you could ever get away with bypassing the
> parse operation.

By delayed evaluation. Conceptually, you put a virtual element on the result
tree which is represented by means of its serialized XML string. You only
expand this element if you need to; if the only operation performed on it is
to serialize it, then you don't bother parsing it.

Of course, in practice, processors don't actually build the result tree in
memory anyway. There's a difference between how the semantics are described
and how the implementation actually works.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]