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

Re: AltovaXML and fragment identifier

Subject: Re: AltovaXML and fragment identifier
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Tue, 31 Mar 2009 16:34:46 +0200
Re:  AltovaXML and fragment identifier
David Carlisle schrieb:
I wrote

, however a system is allowed to reject any URI at all and if it
chooses to reject all uri with fragids passed to doc() or document()
it can do that, but it should raise [err:FODC0005].

which is false. It's true for doc() (which was what I was reading) but for document() the spec explictly says that the fragment identifier should be stripped off and used after retrieval.

So

document('test2009031701.xml#f1')

is the same as

document('test2009031701.xml')/id('f1')

or an error, depending on various factors....

The latter syntax is XSLT 2.0, but the former is very useful syntactic sugar for 1.0, because it allows to pull a node-set from a secondary document based on an ID type attribute without creating a result tree fragment.

I couldn't find that nice behaviour prescribed by the spec for XSLT 1.0,
but Saxon 6.5 and LibXSLT 1.1.24 implement it. (Xalan 2.7.1 doesn't, and
MSXML 4.0 and 6.0 don't seem to. And AltovaXML Version 2008 rel. 2 sp2
throws an error, which caused this thread.) The spec for 1.0 says:

  If the URI reference does not contain a fragment identifier, then a
  node-set containing just the root node of the document is returned. If
  the URI reference does contain a fragment identifier, the function
  returns a node-set containing the nodes in the tree identified by the
  fragment identifier of the URI reference. The semantics of the
  fragment identifier is dependent on the media type of the result of
  retrieving the URI.
  -- http://www.w3.org/TR/1999/REC-xslt-19991116#document

"The nodes in the tree identified by the fragment identifier of the URI
reference." Okay, it makes sense to take this to mean a call to the id()
function.

If this nice behaviour is mandatory in 2.0, could you provide a pointer
to the part of the spec saying so? (I couldn't find it.)

Michael Ludwig

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.