OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Understanding the scope of XML catalog

Fellow XML-Dev'ers,

I'm trying to better understand the use of an XML catalog to find a schema for validation.

In addition to PUBLIC and SYSTEM identifier resolution, I understand that the <uri> element will map namespace names to locations per:

"Mapping the URI reference of a resource (a namespace name, stylesheet, image, etc.) to another URI reference."

URI Entries
"URI references that are not part of an <https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.ext.ent>external identifier, such as namespace names, stylesheets, included files, graphics, and hypertext references, simply identify other resources. They are resolved using URI entries as described below."

And so I created the following to map the UBL namespace name to the URI of the schema and I've confirmed the relative location from the catalog file:

<uri name="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"

And my document begins with:

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"

Yet using XJParse, I'm not able to validate my document:

~/t/os-UBL-2.2 $ xjparse -c xsd/UBL-2.2-catalog.xml -s ~/t/j.xml
Attempting well-formed, namespace-aware parse
Error:file:///Users/admin/t/j.xml:4:83:cvc-elt.1.a: Cannot find the declaration of element 'Invoice'.
Parse succeeded (0.39) with 1 error and no warnings.
~/t/os-UBL-2.2 $

Can anyone see where I'm going wrong? This would seem so simple. Based on the documentation I'm expecting the namespace name of the document element of the instance to be matched in the catalog to the URI of the schema. Is that out of bounds of the specification?

I'm clearly missing something.

Thanks for any help anyone can be.

. . . . . . Ken

Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/x/ |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @ US$45 (5 hours free) |

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS