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: XSLT/XPath 2.0 (was "Identifying two tags...")


Hi Wendell,

> At 01:59 PM 5/6/2002, Evan Lenz wrote:
>>Some people are concerned about the sheer number of functions and
>>operators in XPath 2.0 (almost five times as many as in 1.0). A
>>related issue is XPath 2.0's heavy dependence on XML Schemas. I
>>personally share some of these concerns. The real test of the
>>specification's success is the number and quality of
>>implementations. Saxon 7 is a good pioneer. It would be great (even
>>crucial) to see more efforts sprout up before we approach
>>Recommendation status.
>
> Could you comment more specifically please on the heavy dependence
> on Schemas you mention?
>
> In particular, I'm concerned whether this dependence will mean it's
> not possible to use XPath 2, with its sequences, conditionals etc.,
> in an environment where there is no schema (or no W3C Schema).

>From reading the WD, the XPath 2.0 data model specifically supports
documents that don't have a schema, and either have a DTD instead or
just have a well-formed XML document, or even documents that are
partially valid against an XML Schema schema. It could even support
other schema languages, although the concept of a named "type" (which
isn't really present in, say, RELAX NG) is pretty fundamental to the
data model.

The mappings from well-formed or DTD-valid documents aren't spelled
out in detail yet, but it's likely that they'll be treated exactly as
if they had been validated against a fairly loose schema. So a purely
well-formed element will be treated like any element with the type
xs:anyType (allowing any content and any attributes). Since the "data
types" in DTDs (such as NMTOKEN) are supported in XML Schema, they can
be used more directly -- the document will look as if it had been
validated by an XML Schema generated from the DTD.

So you'll be able to use XPath 2.0 without worrying about schema stuff
without any problems. With any luck, there will be levels of
conformance that mean that processors won't have to support the more
complex side of the validation system described in the XPath 2.0
draft, which means that if you're not interested in XML Schema
validation then you won't have to be weighed down by a processor that
is [ref. http://lists.xml.org/archives/xml-dev/200205/msg00343.html].

Actually, one interesting features of XSLT 2.0 introduced in the
latest WD is that you can specify (with xsl:import-schema) what schema
is being used *in the stylesheet* rather than waiting to see what a
particular source document is using. Currently there's a bit of a
confusing situation where the schema you import, which is used for
static (compile-time) checking might be completely different from the
schema that's used by the source document, with types checked at run
time. But if that were remedied, this could lead to being able to have
very focused schemas, providing the view of the document that you need
for your transformation, rather than relying on the schema that's
reported in the instance document. The XSLT 2.0 WD currently only
allows you to import XML Schema schemas, but with a bit of pressure
perhaps we can persuade them to make an extensible architecture
allowing for other types (including DTDs) as well.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.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]