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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl message

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


Subject: Re: [ubl] Validating UBL 2.0 genericode files with Altova XMLSpy


Hi Roberto,

Thank you for your reply. Yes, that makes it clear, and I can follow your instructions. (btw English is not my first language either)

Obviously, what you say applies to the XML editor your are using (which one is it?), as well as oXygen (according to Ken).
However, it does not work for XMLSpy, which requires the schemaLocation attribute before it is searching the XML Catalog for a matching entry.

So it seems that with XMLSpy, in order to validate a UBL gc file, one has to add manually the schemaLocation attribute (with the correct urn and a (possibly bogus) storage location).

That also means that XMLSpy does not need the <system> tag to resolve locally when a schemaLocation attribute is present. Seems like other tools function differently here also?

In short, it seems that the gc files are not compatible with XMLSpy and its XML Catalog implementation, unless I am missing something.

Am I right to conclude that the XML Catalog specification should be more specific, and define which of the two uri MUST be used: the namespace uri, or the schemaLocation URI. With that ambiguity, different tool vendors will implement it differently, causing this very issue.

What do you think? Does anyone validate gc files with Stylus Studio, or any other XML editors? Is XMLSpy the only one that fails?

Juerg

> Roberto wrote:
> -------------------------------------------------------------------------
> Hello Juerg,
> I answer you question:
> 
> "That seems like a good idea to me in any case. But would this allow to
> validate a gc file using XMLSpy when the schemaLocation attribute is
> absent?"
> 
> Using an XML Catalog in general you can resolve locally any URI even when
> the schemaLocation is missing.
> 
> You have to fill the catalog with an URI tag as the below sample for
> genericode:
> 
> <uri name="http://genericode.org/2006/ns/CodeList/0.4/";;
> uri="./xsd/CodeList.xsd"/>
> 
> This way the genericode codelist you are using will be validated
> successfully.
> 
> e.g.
> 
> <gc:CodeList xmlns:gc="http://genericode.org/2006/ns/CodeList/0.4/";;>
> ...
> 
> the genericode namespace will be resolved with the catalog correctly.
> --------------
> 
> If you have a schemaLocation and you need to resolve locally a URI you
> have to use a "system" tag instead into your catalog.
> 
> <system systemId="CodeList.xsd" uri="./xsd/CodeList.xsd"/>
> 
> 
> I hope I have been enought clear with my explanation as this is not may
> mother language.
> 
> Best regards
> 
> UBL ITLSC
> co-chair
> Roberto Cisternino
> 
> 
> Juerg wrote:
> -------------------------------------------------------------------------
> 
> Hi,
> 
> Excerpts from previous replies on this subject:
> 
> 
> > Dear Juerg,
> >
> > What information were you expecting XML Spy to use to look up a Schema
> > location in the catalog?  Were you expecting it to use the namespace URI?
> > You seem surprised that it uses the Schema location.
> >
> > Cheers, Tony.
> 
> Tony,
> I am not surprised that it uses the Schema location. But I am surprised
> that the gc files shipped with UBL 2.0 rely on specific XML editor
> features in order to validate correctly.
> 
> > So ... I can do what is necessary in oXygen ...
> > Juerg cannot, apparently, do the same in XMLSpy,
> > so the question is "is there some configuration
> > in XMLSpy to map a namespace to a schema?"
> >
> > . . . . . . . . . . Ken
> 
> Ken,
> Thanks for clarifying. That seems to be the central question.
> - - - - -
> > The XML Spy docs are very vague on this.  The text suggest that they only
> > use the catalog to match the public ID in a DOCTYPE declaration.  However,
> > the subset of OASIS XML Catalogs that they use suggests that they might
> > also be able to match some URIs.  From what Juerg wrote, it sounds like
> > XML Spy will match a Schema location to a URI in the catalog, but not a
> > namespace URI.
> >
> > Cheers, Tony.
> 
> Tony,
> Correct, I have been able to use XMLSpy's XML catalog subset (the uri
> name=... uri=... clause) successfully, but only when a Schemalocation is
> present in the gc file.
> - - - - -
> > Yes, that is my interpretation of Juerg's
> > analysis.  And I see no reference in the XML
> > Catalog specification[1] for mapping a namespace
> > URI to a system resource.  I've written to some
> > catalogue users off-line to see if I'm missing
> > something.  If true, then it would be a feature
> > of an editing tool outside of support for the XML Catalog specification.
> >
> 
> If that is true, then one would like to think that the OASIS standard for
> gc files should not depend on features of individual editing tools ...?
> 
> > In oXygen I can configure precisely what I need
> > to edit the PRD3 genericode files:  a mapping of
> > a namespace URI string to a schema location in
> > the absence of an xsi:schemaLocation attribute.
> >
> > I hope someone can point us to this feature, if it exists, in XML Spy.
> >
> 
> I hope so too. Alternatively, how are other editing tools faring?
> 
> > . . . . . . . . . . Ken
> - - - - -
> > I was part of the committee for OASIS XML Catalogs, as it happens.  URI
> > rewriting is mentioned in section 4.2:
> >
> > http://www.oasis-open.org/committees/entity/spec-2001-08-06.html#s.uri.ent
> >
> > The thing is, it is up to a particular application to decide *which* URIs
> > are rewritten using the catalog.  There is built-in support for public and
> > system IDs are defined for DTDs, but otherwise everything is just URLs.
> >
> > Cheers, Tony.
> 
> Tony,
> I am not to familiar with the rewriteURI clause in the context of gc files
> urns. What would I have to specify for uriIDStartString= and
> rewritePrefix= ?
> Would this use the namespace URI, or the schemaLocation URI? If the
> latter, I fear the rewriteURI may not solve this problem either ...
> 
> - - - - -
> 
> > I really think we should include a pre-compiled xml catalog with the UBL
> > support package including all GCs and XSDs setting for URI resolving.
> >
> > - URI are more suitable to resolve namespaces
> > - SystemID are more indicated to resolve schemaLocations
> >
> > Thus we have to deal with URI rewrites only I think.
> >
> > This pre-compiled xml catalog could be located into the UBL distribution
> > root and have a base address like ./
> >
> > What do you think about ?
> >
> > UBL ITLSC
> > co-chair
> > Roberto Cisternino
> 
> Roberto,
> That seems like a good idea to me in any case. But would this allow to
> validate a gc file using XMLSpy when the schemaLocation attribute is
> absent?
> 
> Many thanks for your contributions.
> Juerg
>    


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