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

Re: [XPath] matching elements which satisfy a specific

Subject: Re: [XPath] matching elements which satisfy a specific content model
From: Tobias Reif <tobiasreif@xxxxxxxxxxxxx>
Date: Thu, 16 Jan 2003 16:17:05 +0100
xpath testing content element
Michael Kay wrote:

>> But I'm proposing a content-model() function whose only reason for
>> existence is simplification and terseness.
>
> At one stage XQuery did this. It had its own grammar for describing
> content models, with all the paraphernalia of lists and unions and
> sequences, and it allowed you to test whether a particular element
> conformed to a particular content model (so-called "structural
> typing").

Sounds great; anything online?

> Everyone came down on them like a ton of bricks,

:(

> saying W3C
> already had a language for doing that and it was called XML Schema.

They don't seem to like the principle called TIMTOWTDI ... and the one where one chooses the least powerful tech/lang for each task. (simple grammar for simple models, full-blown schema lang for complex models)

> So
> they took it all out, leaving just the ability to test whether a
> particular element is a valid instance of a particular schema-defined
> type: "named typing". The result is vastly simpler,

... inside the pattern, but not overall, since the content is described elsewhere (and I wouldn't call WXS "vastly simple").

> but it does assume
> that you want to define your content models in a schema and not in a
> stylesheet - a reasonable assumption, in my view.

I'd prefer choice. This way, the "structural typing"/content-model() could stay very terse and simple, and then there would be "named typing" for all the complex content models which are better described with WXS or RNG.

But again: What you describe (XSLT2 + XML Schemas(WXS/RNG)) will probably be a lot more fun than XSLT + XPath1.0 for describing (matching/testing) content models.

Tobi

--

Vim users               donate.
http://iccf-holland.org/donate.html

Web developers           check.
http://www.pinkjuice.com/check/


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



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.