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

Understanding the scope of XML catalog

  • From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
  • To: XML-Dev Mailing list <xml-dev@lists.xml.org>
  • Date: Fri, 01 Mar 2019 21:06:37 -0500

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]


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.
First Name
Last Name
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.