XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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]
Re: [xml-dev] Understanding the scope of XML catalog

There's no guarantee that a particular XML parser will respect "uri" elements, in particular not for namespaces, which are normally treated as literal strings in the shape of a URI.


On Fri, Mar 1, 2019 at 9:07 PM G. Ken Holman <gkholman@cranesoftwrights.com> wrote:
 
URI Entries
https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.uri.ent
"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"
         uri="maindoc/UBL-Invoice-2.2.xsd"/>

And my document begins with:

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
         <cbc:UBLVersionID>2.1</cbc:UBLVersionID>
         <cbc:ID>TOSL108</cbc:ID>
         <cbc:IssueDate>2009-12-15</cbc:IssueDate>

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) |


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[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