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

Re: keys and idrefs - XSLT2 request?

Subject: Re: keys and idrefs - XSLT2 request?
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 12:30:14 +0100
tennison warning
Hi Dave,

>> *But* if you have an element that looks the same as one in XSLT
>> 1.0, has XPath expressions that look like XPath 1.0, but actually
>> behaves completely differently, then the XSLT 1.0 processor won't
>> warn you, won't give you an error, it will just go ahead and
>> process the thing, but give completely different results.
> I was hoping that the processor would see 2.0, know it was a 1.0
> processor, and stop, right there, or at least give a warning.

As David's said, this is behaviour defined in XSLT 1.0, so there's
nothing that we can do about it now (the XSLT 2.0 spec can't change
how XSLT 1.0 processors work, though they could make XSLT 2.0
processors work differently to prevent the same kind of problems when
we get to XSLT 3.0 :)

> For this particular case it would only process the first token
> from the idrefs list, as it does today.

What it would do today is take the whole IDREFS string and use that -
XPath 1.0 doesn't automatically break IDREFS attribute values into
individual tokens.

>> I don't know what/whether the XSL WG have decided to do about
>> backwards compatibility in XPath - it probably depends on how much
>> they feel they have to nanny us authors to make sure that we're
>> told when our stylesheets are running under the wrong processors...
> If the WG are going to wrap us in so much cotton wool, I wouldn't be
> best pleased.
> A warning (this particular case) would be the softest I would
> appreciate, it would at least let me know that something is awry.
> I still like the first solution, just a bit of logical extension.

>From Mike's response ("In fact, if you have a schema that declares
@attr to be a sequence data type, then you won't even need to do this,
you'll get the sequence automatically."), it sounds as if that's what
you're going to get.

So then all you have to worry about is that the stylesheet won't work
in the same way if the DTD's not available or isn't declared in a
particular instance document (it's always a slight issue, because of
default attribute values and id(), but it has much more impact now).



Jeni Tennison

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

Current Thread


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.
First Name
Last Name
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.