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

Re: XSLT 2.0 and XSL(-FO) 2.0


Re:  XSLT 2.0 and XSL(-FO) 2.0
Hi Tom,

>> > Do you think that it would make sense for the *only* validation to be
>> > done on a document to be validation dictated by the stylesheet?
>>
>> yes.
>
> Me, too, but with the proviso that there be some means to optionally
> tell the processor to use the schema reference in the source
> document. Otherwise, if we wanted to use the schema, the stylesheet
> would have to be told the URI of the schema, which might be
> impossible - we wouldn't usually know it.

I think that the only time we wouldn't know the location of the schema
is if we were writing a generic stylesheet -- one that didn't care
about the structure of the source document. I agree that for these
situation you need some way of using the schema associated with the
source document.

David's suggestion of identifying it through the
xsi:(noNamespaceS|s)chemaLocation attribute is a good one, I'd
guess. It has the disadvantage that the application has to start
parsing the document before it can work out where to look for the
schema against which to validate it, but that's a common problem with
the xsi:(noNamespaceS|s)chemaLocation attribute anyway.

The advantage of not hardwiring *how* the schema is retrieved is that
is enables you to use other heuristics to locate the schema. A
stylesheet could have its own mapping between namespace URIs, or the
names of document elements, and physical schemas against which the
document should be assessed. I think that a solution should support
those possibilities. In addition, it opens the way for other
mechanisms for schema location (e.g. PIs to point to RELAX NG schemas)
to be used in other situations.

> It would also be useful to ask the processor to use the
> document-supplied schema with a fallback to no-schema-processing if
> the specifiec schema should not be available. I'm not too sure about
> this one, though, because what if part of the stylesheet referred to
> specific PSVI types?

I think that a well-designed stylesheet should reference a schema that
contains the type definitions for any types that it uses internally.
Otherwise it's like using a named template and expecting the source
document to provide its definition; not a wise course of action. In
fact, given that (in some applications) you might have a compile-once,
use-multiple-times architecture, it would be fatal to refer to a type
for which you don't have a definition within a referenced schema.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.