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 Dan,

> Thanks for the tip! I'll most certainly do that (although I fear
> that "I'd like to be spared of 80% of the spec" is not exactly what
> the WG would like to hear...).

Yeah well, they might not want to hear it, but if enough people say it
enough times perhaps they might start having to. And I do think that
they're genuinely interested in learning what users think, especially
about *which* 80% they don't like. I posted my 80% list to XML-Dev
yesterday (because it came up there; I've previously made most of
those comments both here and on the proper comments lists as well) --
have a look at
http://lists.xml.org/archives/xml-dev/200205/msg00548.html

> What you're saying is really food for though: if you of all people
> are having a hard time "getting your head around" the intricacies of
> the type system in XSLT 2, what are my (and other, more average
> Joes' out there) chances? And even if I did take 6 months off for
> quality time with XQuery semantics and friends, what good would it
> do me (besides the obvious bragging rights)?

I have the feeling that much of what makes XPath/XSLT 2.0 seem
complicated is simply that it hasn't been described well. If you're
had your head buried in the details for months, then it's often hard
to write it down without skipping over the assumptions that you've
come to take for granted, or spending too long on the exceptional,
difficult cases. Again, we can help here by asking the dumb questions,
like "what's the difference between 'treat' and 'assert'?"

> Heck, I can't even quite grasp what that PSVI thingy is supposed to
> be (it's one of those "almost, but in reality: no" things). Since
> all the other stuff seems to be built on that, I'll admit that my
> chances look quite slim.

The PSVI is the stuff that you get out of validating an instance
document with an XML Schema. You know that if you validate an instance
against a DTD, it's different from what you get if you look at the
instance without the DTD? With the DTD, you get additional defaulted
attributes, plus you get information about the types of attributes,
like "this is an ID attribute". In some data models, you also get the
element and attribute declarations, so you can refer to them later on.

What parts of that set of information an application actually needs to
know depends on the application. XPath 1.0, for example, doesn't care
about element or attribute declarations, or about most of the data
types aside from ID attributes, but it does keep the defaulted
attributes.

The PSVI is exactly the same thing, except it's what you get after
schema validation. It's the same instance as you get normally, with
extra defaulted/fixed values, and indications of the types of elements
and attributes. You get element and attribute declarations, just like
from a DTD. Plus, because you have user-defined types in XML Schema
and they're all part of a hierarchy, you get the type hierarchy as
well. There are a few other things, but that's the important stuff.

Like XPath 1.0, XPath 2.0 picks and chooses from this set of
information to build up its data model. It keeps hold of information
about the types of particular elements and attributes, and some
information about the type hierarchy (like how types are derived from
each other).

I found that looking at the PSVI output of XSV
(http://www.ltg.ed.ac.uk/~ht/xsv-status.html), which is described at
http://www.w3.org/2001/05/serialized-infoset-schema.html, helped to
visualise what it looked like; just remember that it wouldn't normally
be passed around as an XML structure!

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]