[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: Serialization of XDM - Use cases / Proposal
- From: "Michael Kay" <mike@saxonica.com>
- To: "'David A. Lee'" <dlee@calldei.com>
- Date: Tue, 29 Sep 2009 14:36:47 +0100
The first question I have in mind is how do we parse
this. This one example of Michaels has me a little confused:
<xsl:sequence
select="xs:positiveInteger('5')"/>
This is the proposal
for how to represent a typed atomic value. This is pretty
obscure to my novice eyes. Reading this I wouldn't guess off hand that
this means "Atomic value, type xs:positiveInteger, text value '5'".
Well, I think it's merit is that it's familiar
syntax and semantics for anyone who knows XSLT 2.0 or wants to go and read the
spec. For many purposes, however, a more convenient syntax would be
<atomicValue value="5"
type="xs:positiveInteger"/>.
That then
leads me to the final question. Suppose we transform this serialized form
"almost an xslt" format, into "real xslt" format, then run a real XSLT 2.0
parser on it. How to get the resulting values out ?
Please bear
with me as I'm very much a novice at XSLT ... maybe the answer is
"obvious". XSLT 2.0 claims that the result of an XSLT transformation can be a
'set of result trees'. Thats an XDM sequence . (???)
No: XQuery can produce any XDM sequence as output (well,
almost any - it can't for example generate unparsed entities); but XSLT can only
produce a set of document nodes. You can write an xsl:function to produce any
XDM sequence as its result, but you would need a processor-specific way of
invoking the function and capturing its result in the external
environment.
Incidentally, I was reminded of this project in some work with
a client yesterday. They are running MarkLogic queries and feeding the result
into Saxon, currently via lexical XML (it has to be serialized because it's on a
different machine). In this kind of scenario it would be nice to transfer a
typed document, but we really don't want a five-fold increase in document size
over the lexical XML. Size does matter.
Regards,
Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay
|
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|