|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: using schemaLocation to point multiple same namespace sche
> -----Original Message----- > From: Klotz, Leigh [mailto:Leigh.Klotz@p...] > Sent: Wednesday, September 04, 2002 4:43 PM > To: Dare Obasanjo; 'Wo Chang'; 'XML' > Naively (i.e., before today) I'd have thought you define a > language that uses this <? xml version="1.0 ?> <validate > xmlns="urn:mystuff" > schemas="http://www.example.com/schemas/money.xsd > http://commerce.example.com/schemas/po.xsd > http://www.example.com/schemas/checks.xsd" > document="file://po.xml" /> > to mean "validate the po.xml file with the three xsd files > specified, and figure out their namespaces." W3C XML Schema it does not work that way. You either specify a single schema without a target namespace or multiple pairs of target namespaces and schemas. The fact that one can only specify a single schema without a namespace implies that the namespace<->schema location pairs are meant to be unique per namespace. > ANSWER: If you allow money.xsd and checks.xsd both to specify > types in the same namespace, it's hard to implement a > processor for this validation language. At least with the > Microsoft .NET Schema validator, >Is this an implementation convenience as well, or is it an >expression of some deeper issue about schemas and document classes >and namespaces? Like I said, the REC gives a lot of leeway. It is conceivable that an implementation would honor all specified schemas with the same target namespace (or no target namespace) but this would add complexity and open a number of questions * Should all the schemas be merged before into one giant pseudo-schema before validation? If so what happens upon errors related to this merging such as redeclarations of the same global types or elements? * Should the document be validated against each schema in turn? If so, doesn't this hurt performance? * Should other specified schemas only be consulted when the current element or attribute being validated cannot be located in the schema? This is basically, a lazy version of the merging option that just delays the tough questions as to what to do upon encountering redeclarations and the like. We decided to stick with the simple and straightforward option of respecting only the first schema in the list of schema locations given for a particular namespace. In our opinion, such interactions between schemas should be explicitly specified at the schema level and not at the instance document level. -- PITHY WORDS OF WISDOM In any contest between power and patience, bet on patience. This posting is provided "AS IS" with no warranties, and confers no rights.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








