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

Re: Understanding the scope of XML catalog

  • From: John Cowan <johnwcowan@gmail.com>
  • To: "G. Ken Holman" <gkholman@cranesoftwrights.com>
  • Date: Fri, 1 Mar 2019 23:24:50 -0500

Re:  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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

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