OASIS Universal Business Language (UBL) TC

 View Only

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

  • 1.  Re: [ubl] Validating UBL 2.0 genericode files with Altova XMLSpy

    Posted 09-27-2006 01:07
    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