Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Including schema with target namespace from schema with no target namespace

From: Bob Kline <bkline@---------.--->
To: xmlschema-dev@--.---
Date: 2/9/2009 7:07:00 AM
We've got XML documents which look (greatly simplified) like this:

<?xml version='1.0' encoding='utf-8'?>
<TopLevelElement cdr:ref='...' otherAttribute='...'>...</TopLevelElement>

None of the element names and few of the attribute names in the 
documents include colons.  The structures for the documents evolved well 
before the w3c bodies released their recommendations on namespaces and 
schemas.  The use of colons in some of the attribute names was done to 
accomplish in a DTD-based, pre-namespace-aware world roughly the same 
thing which the namespace rec gives as its motivation (avoid stepping on 
names which would be the same without 'cdr:' part).  When the namespace 
rec was released we added xmlns:cdr='...' to the top-level elements of 
the documents so namespace-aware processors wouldn't choke on the documents.

In an attempt to migrate from DTD validation to XML Schema validation, 
we're running into a stumbling block.  Since each schema document can 
have at most only one target namespace, we've put the definitions for 
the cdr prefixed attributes in one schema document, which has a target 
namespace.  We then include that document in the schema document for the 
rest of the elements and types.  Schema processors won't accept this, 
complaining that  "[t]he target namespace of the included/redefined 
schema 'CdrNamespaceAttributes.xml' has to be absent, since the 
including/redefining schema has no target namespace."

If that's so, how do we go about validating a document which looks like 
the one above using XML Schema?

-- 
Bob Kline
http://www.rksystems.com
mailto:bkline@r...



From tobias.koenig@t... Tue Feb 10 11:23:22 2009
Received: from magg


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent