[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XML document --> lightweight in-memory tree --> XDM --> Process! ... Who created the XDM data model: the XML Processor or the XSLT Processor?
- From: David Carlisle <davidc@nag.co.uk>
- To: "Costello, Roger L." <costello@mitre.org>
- Date: Wed, 22 Aug 2012 20:56:29 +0100
On 22/08/2012 20:42, Costello, Roger L. wrote:
> Hi Folks,
>
> Thanks for the excellent replies yesterday.
>
> I learned a lot.
>
> To recap, an XML document is ingested by an XML processor, which
> builds a lightweight in-memory tree of it, or it generates a sequence
> of SAX events:
>
> XML document --> lightweight, in-memory tree
>
> or
>
> XML document --> sequence of SAX events
>
> Good.
>
> Now sitting over here is an XML application -- an XSLT processor --
> that is eager to get that XML document.
>
> However, the XSLT processor wants the XML document in particular
> form; it wants it in the form specified by the XDM data model.
>
> So here's what we've got:
>
> XML document --> lightweight, in-memory tree --> XDM --> XSLT
> processing
>
> or
>
> XML document --> sequence of SAX events --> XSD --> XSLT processing
>
> How do we get from the lightweight, in-memory tree to XDM? From the
> sequence of SAX events to XDM?
You don't XDM is an abstract tree description that describes everything
an XSLT engine needs to know about the document. It isn't a concrete
datatype.
>
> Specifically, who creates the XDM data model?
The tree can be created by the xml parser or the XSLT engine, depending
(or in principle needen't be generated at all, note all the text about
streaming in XSLT3 drafts)
saxon for example wil take a DOM tree if the parser gives it one or
(which is usually better) it will build its own saxon-specific tree if
it gets a stream of sax events.
>
> Does the XML processor create the XDM and then hand it over to the
> XSLT processor?
>
> Or does the XSLT processor create the XDM?
see above.
>
> Next, to be sure that I see the pattern, let's switch over to another
> XML application: XML Schema validators.
>
> XML Schema validators don't operate on the XDM data model; instead,
> they operate on the XML Infoset.
well infoset is like XDM just an abstract tree description. Mostly it
contains more information than XDM as it can record things like entity
boundaries.
>
> Same question as above: who creates the XML Infoset? The XML
> processor or the XML Schema validator?
same answer as for XDM.
>
> /Roger
>
David
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]