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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-msg message

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


Subject: [ebxml-msg] Re: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory


Title: RE: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
In order to use the xml:lang attribute some parsers (e.g. Xerces) require the declaration
 
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
 
However, there are some other parsers (e.g., XML Authority, Internet Explorer) that choke on the above declaration because they consider the namespace prefix xml as reserved and cannot be redeclared.
 
I have previously raised the question of whether it is appropriate to include the construct
 
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
 
as part of he schema definition to Scott Vorthmann, architect of the XML Authority product. His answer was as follows (the entire chain of discussion is also attached to this message):
 
"I believe the Namespaces spec is less than specific on this point, but the accepted interpretation is that it is illegal to attempt to define the "xml" prefix... it should be implicitly defined.  XA and XML Spy disagreed on this, and it was raised on a W3C Schema WG discussion list, with the outcome being that it is at best bad practice to define the prefix, even if you define it to the correct namespace.  The best practice is to leave it as implicitly defined."

It seems to me the workaround for the above problem is for each MSH implementation to carry out the validation against a local version of the msg-header-2_0.xsd that either includes or excludes the xmlns:xml="http://www.w3.org/XML/1998/namespace" declaration, depending on the parser that it is using.
 
The question we have to decide is which version we should use as the official http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd.
 
-Arvola
-----Original Message-----
From: Ahmed, Zahid <zahid.ahmed@commerceone.com>
To: 'Christopher Ferris' <chris.ferris@sun.com>; Cliff Collins <collinsc@sybase.com>
Cc: Arvola Chan <arvola@tibco.com>; David Fischer <david@drummondgroup.com>; Tony Weida <rweida@hotmail.com>; Ahmed, Zahid <zahid.ahmed@commerceone.com>; dougb62@yahoo.com <dougb62@yahoo.com>
Date: Thursday, January 10, 2002 5:43 PM
Subject: RE: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory

Preliminary result w/xerces2 also were problematic w/same
org.xml.sax.SAXException: namespace declaration
for namespace="http://www.w3.org/XML/1998/namespace"
for the  draft-cpp-cpa-08b.xsd.

However, strange thing was that I managed to get the
msg-header-2_0.xsd schema processed correctly using
xerces1 parser when I made one change in the
msg-header-2_0.xsd, by adding following declaration:

xmlns:xml="http://www.w3.org/XML/1998/namespace"

However, the draft-cpp-cpa-08b.xsd still has same
problem w/both xerces1 and xerces2.

I'll figure it out if it's my configuration problem,
but would be nice to know if others are facing this
issue. This was exposed when I started using Castor
X2J schema converter. BTW, what's the connection of
the xml_lang.xsd with http://www.w3.org/XML/1998/namespace?

thanks for the feedback,
Zahid



-----Original Message-----
From: Christopher Ferris [mailto:chris.ferris@sun.com]
Sent: Thursday, January 10, 2002 3:34 PM
To: Cliff Collins
Cc: Arvola Chan; David Fischer; Tony Weida; zahid.ahmed@commerceone.com;
dougb62@yahoo.com
Subject: Re: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory


Unless you need to validate the messages, then there shouldn't
be an issue.

Are you certain that you need Xerces 1.x and cannot use
2.0 beta? I seem to recall that XSS was upgraded so that
it could be used with the latest version of Xerces.

Cheers,

Chris

Cliff Collins wrote:

> it might have problems. I could NOT switch to a different parser because of
> dependencies on that parser (xss from IBM for signing and others).
>
> David, I don't remember if Sterling used xerces and had these problems. Last
> I remember Cyclone, Btrade and Sybase were all using xerces.
>
> Cliff
>
>
>>-----Original Message-----
>>From: Arvola Chan [mailto:arvola@tibco.com]
>>Sent: Thursday, January 10, 2002 2:29 PM
>>To: Cliff.Collins@sybase.com; David Fischer; Tony Weida;
>>zahid.ahmed@commerceone.com
>>Cc: chris.ferris@sun.com; dougb62@yahoo.com
>>Subject: Re: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
>>
>>
>>I wonder if the Xerces parser 1.4.x is buggy. The Xerces Java
>>Parser Readme
>>for the 1.4.4 Release indicates that it provides only beta support for XML
>>Schema 1.0. A cursory glance at the limitation section of the
>>release notes
>>gives me the impression that its support for xsi:schemaLocation
>>specification may be flaky. Consider the following excerpt which suggests
>>that in an instance document, the schema location can be specified in the
>>following form:
>>
>>    xsi:schemaLocation='http://my.com document.xsd'
>>
>>But this is not even correct syntax. The W3C Recommendation requires the
>>right hand side of the assignment be a string made up of two
>>components: the
>>namespace in question and the corresponding schema location.
>>
>>I know the error Collin has seen is different from the one Zahid has
>>reported. I suspect that Zahid may be using an even older version of the
>>parser. It does not seem to understand the concept of importing from a
>>namespace with an associated schema location.
>>
>>-Arvola
>>
>>EXCERPT FROM XERCES RELEASE NOTES:
>>
>>Schema grammars can be associated with instance documents in two ways. An
>>application developer may use the
>>http://apache.org/xml/properties/schema/external-schemaLocation and the
>>http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
>>properties to associate schemas with namespaces appearing in instance
>>documents; see the "properties" section of this documentation for details.
>>If this property is not set, then each document that uses XML Schema
>>grammars must specify the location of the grammars it uses by using an
>>xsi:schemaLocation attribute if they use namespaces, and an
>>xsi:noNamespaceSchemaLocation attribute otherwise. These are
>>usually placed
>>on the root / top-level element in the document, though they may occur on
>>any element; for more details see XML Schema Part 1 section 4.3.2. Here is
>>an example with no target namespace:
>>
>>
>>     <document
>>  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>>  xsi:noNamespaceSchemaLocation='document.xsd'>
>>...
>></document>
>>
>>
>>
>>Here is an example with a target namespace. Note that it is an error to
>>specify a different namespace than the target namespace defined in the
>>Schema.
>>
>>
>>     <document
>>  xmlns='http://my.com'
>>  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>>  xsi:schemaLocation='http://my.com document.xsd'>
>>...
>></document>
>>
>>
>>
>>
>>
>>-----Original Message-----
>>From: Cliff Collins <collinsc@sybase.com>
>>To: David Fischer <david@drummondgroup.com>; Arvola Chan
>><arvola@tibco.com>;
>>Tony Weida <rweida@hotmail.com>
>>Date: Thursday, January 10, 2002 12:52 PM
>>Subject: RE: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
>>
>>
>>
>>>These are the errors that we get from xerces 1.4.x parser when validation
>>>
>>is
>>
>>>on.
>>>
>>>12:56:09 [TRACE] [TRP:EBXMLEnvelope rec#0]: DocumentBuilderFactory used:
>>>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@178933
>>>12:56:13 [TRACE] [TRP:SAXErrorHandler rec#0]: XML parse error: (3,270)
>>>Error: constraint 3.x.3: Attribute 'form' cannot appear in element
>>>'attribute'.
>>>12:56:13 [TRACE] [TRP:SAXErrorHandler rec#0]: XML parse error: (3,270)
>>>Schema error: prefix : [xml] cannot be resolved to a URI.
>>>12:56:13 [TRACE] [TRP:SAXErrorHandler rec#0]: XML parse error: (3,270)
>>>Schema error: no attribute named "lang" was defined in schema : .
>>>12:56:13 [TRACE] [TRP:SAXErrorHandler rec#0]: XML parse error: (21,37)
>>>Attribute "xml:lang" must be declared for element type "eb:Description".
>>>
>>>
>>>>-----Original Message-----
>>>>From: David Fischer [mailto:david@drummondgroup.com]
>>>>Sent: Thursday, January 10, 2002 11:50 AM
>>>>To: Arvola Chan; Tony Weida
>>>>Cc: Cliff.Collins@sybase.com
>>>>Subject: RE: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
>>>>
>>>>
>>>>This is what Cliff sent me when I asked.
>>>>
>>>>David.
>>>>
>>>>-----Original Message-----
>>>>From: Arvola Chan [mailto:arvola@tibco.com]
>>>>Sent: Thursday, January 10, 2002 1:42 PM
>>>>To: David Fischer; Tony Weida
>>>>Subject: Re: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
>>>>
>>>>
>>>>David:
>>>>
>>>>Zahid sent me inquiries originally. I recommended that he get in
>>>>touch with
>>>>you (see attached message).
>>>>
>>>>Can you tell me what is the exact error that is trapped by the
>>>>interoperability participants? Does that error occur universally? I can
>>>>
>>do
>>
>>>>some further research into the issue if you can provide me with the
>>>>
>>actual
>>
>>>>error reported by a specific parser.
>>>>
>>>>I believe RosettaNet schema definitions make use of the xml:lang
>>>>construct.
>>>>I am surprised that the construct is causing problem.
>>>>
>>>>Regards,
>>>>-Arvola
>>>>
>>>>-----Original Message-----
>>>>From: David Fischer <david@drummondgroup.com>
>>>>To: Arvola Chan <arvola@tibco.com>; Tony Weida <rweida@hotmail.com>
>>>>Date: Thursday, January 10, 2002 11:25 AM
>>>>Subject: RE: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
>>>>
>>>>
>>>>
>>>>>Arvola, I got another message yesterday concerning xml:lang.  The
>>>>>
>>interop
>>
>>>>>participants are trapping this error and continuing with
>>>>>
>>validation but
>>I
>>
>>>>think
>>>>
>>>>>this is going to be a widespread issue.
>>>>>
>>>>>If you would like to answer this query, feel free.
>>>>>
>>>>>David.
>>>>>
>>>>>-----Original Message-----
>>>>>From: Arvola Chan [mailto:arvola@tibco.com]
>>>>>Sent: Thursday, January 10, 2002 12:16 PM
>>>>>To: Tony Weida
>>>>>Cc: ebxml-cppa@lists.oasis-open.org
>>>>>Subject: [ebxml-cppa] Re: v. 2.0 ebXML xsd schema directory
>>>>>
>>>>>
>>>>>Tony:
>>>>>
>>>>>Peter and I are using different commerically available schema editor
>>>>>products (XML Spy versus XML Authority) that support the W3C
>>>>>
>>Recommended
>>
>>>>>version of XML Schema. We can certainly make sure that the schema is
>>>>>understandable by both of these schema editors.
>>>>>
>>>>>I have been responsible for editing both the MSG and CPP/A
>>>>>
>>>>schemas. The MSG
>>>>
>>>>>schema has been used within the UCC sponsored interoperability tests
>>>>>coordinated by the Drummond Group. So far, the only issue I have heard
>>>>>
>>of
>>
>>>>is
>>>>
>>>>>that one of the parsers cannot deal with the Annotation
>>>>>
>>>>construct. We have
>>>>
>>>>>to decide whether we should retain the use of annotations for
>>>>>comments/documentation purposes within the CPP/A schema.
>>>>>
>>>>>It would also be useful to ask for volunteers among the TC members to
>>>>>
>>use
>>
>>>>>their favorite XML parser to verify that they can understand the CPP/A
>>>>>schema. One thing they must ensure is that the parser at the W3C
>>>>>Recommendation XML Schema level.
>>>>>
>>>>>-Arvola
>>>>>
>>>>>-----Original Message-----
>>>>>From: Tony Weida <rweida@hotmail.com>
>>>>>To: Arvola Chan <arvola@tibco.com>; Dale Moberg
>>>>><dmoberg@cyclonecommerce.com>
>>>>>Date: Thursday, January 10, 2002 4:02 AM
>>>>>Subject: Fw: v. 2.0 ebXML xsd schema directory
>>>>>
>>>>>
>>>>>
>>>>>>Arvola and Dale,
>>>>>>
>>>>>>While I don't think this note raises a particular problem
>>>>>>
>>for CPPA, it
>>
>>>>>>reminded me that we probably want to test at least the final
>>>>>>
>>version of
>>
>>>>the
>>>>
>>>>>>XSD with several parsers including XERCES.
>>>>>>
>>>>>>Tony
>>>>>>
>>>>>>----- Original Message -----
>>>>>>From: "Ahmed, Zahid" <zahid.ahmed@commerceone.com>
>>>>>>To: <david@drummondgroup.com>
>>>>>>Cc: "'Tony Weida'" <rweida@hotmail.com>
>>>>>>Sent: Wednesday, January 09, 2002 9:42 PM
>>>>>>Subject: RE: v. 2.0 ebXML xsd schema directory
>>>>>>
>>>>>>
>>>>>>
>>>>>>>David:
>>>>>>>
>>>>>>>I am trying to process the:
>>>>>>>
>>>>>>>- msg-header-2_0.xsd,
>>>>>>>- draft-msg-header-06.xsd, and
>>>>>>>- draft-cpp-cpa-08b.xsd
>>>>>>>
>>>>>>>schema defintions using the Apache xerces1 parser,
>>>>>>>DOM2, and Castor XML to Java bean processor.
>>>>>>>
>>>>>>>In all 3 xsd files I seem to have schema processor
>>>>>>>problems: it does not seem to process the following
>>>>>>>directive correctly:
>>>>>>>
>>>>>>><import namespace="http://www.w3.org/XML/1998/namespace"
>>>>>>>schemaLocation="http://www.oasis-open.org/committees/ebxml
>>>>>>>msg/schema/xml_lang.xsd"/>
>>>>>>>
>>>>>>>Error:
>>>>>>>org.xml.sax.SAXException: namespace '
>>>>>>>
>>>>>>http://www.w3.org/XML/1998/namespace'
>>>>>>
>>>>>>><http://www.w3.org/XML/1998/namespace'>  not declared in
>>>>>>>schema
>>>>>>>
>>>>>>>        at
>>>>>>>
>>>>>>>
>>>>>>org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(Im
>>>>>>
>>>>portUnmars
>>>>h
>>>>
>>>>>a
>>>>>
>>>>>>>lle
>>>>>>>r.java:115)
>>>>>>>        at
>>>>>>>
>>>>>>>
>>>>>>org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElem
>>>>>>
>>>>ent(Schema
>>>>U
>>>>
>>>>>n
>>>>>
>>>>>>>mar
>>>>>>>shaller.java:387)
>>>>>>>        at
>>>>>>>
>>>>>>>
>>org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
>>
>>>>>>>        at
>>>>>>>
>>>>>>>
>>>>>>org.apache.xerces.validators.common.XMLValidator.callStartElemen
>>>>>>
>>>>t(XMLValid
>>>>a
>>>>
>>>>>t
>>>>>
>>>>>>>or.
>>>>>>>java:1284)
>>>>>>>        at
>>>>>>>
>>>>>>>
>>>>>>org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDo
>>>>>>
>>>>cumentScan
>>>>n
>>>>
>>>>>e
>>>>>
>>>>>>>r.j
>>>>>>>ava:1806)
>>>>>>>
>>>>>>>Any alternative ideas w.r.t. changing the xsd files'
>>>>>>>directive w.r.t. above problem.?
>>>>>>>
>>>>>>>thanks,
>>>>>>>Zahid
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>----------------------------------------------------------------
>>>>>To subscribe or unsubscribe from this elist use the subscription
>>>>>manager: <http://lists.oasis-open.org/ob/adm.pl>
>>>>>
>



I believe the Namespaces spec is less than specific on this point, but the accepted interpretation is that it is illegal to attempt to define the "xml" prefix... it should be implicitly defined.  XA and XML Spy disagreed on this, and it was raised on a W3C Schema WG discussion list, with the outcome being that it is at best bad practice to define the prefix, even if you define it to the correct namespace.  The best practice is to leave it as implicitly defined.

I believe that not only is the prefix implicitly defined, it is also unnecessary to explicitly import the namespace to gain access to "xml:lang" and "xml:space".


>Hi Scott:
>
>Can you please help to answer the question of whether the following
>declaration
>
>    xmlns:xml="http://www.w3.org/XML/1998/namespace"
>
>is necessary in an XML schema that wants to use the xml:lang attribute?
>
>Attached is the schema downloaded from the above URL. It clearly indicates
>that the xml: namespace prefix needs to be declared and that the namespace
>needs to be imported into the target namespace.
>
>On the other hand, both Internet Explorer and XML Authority choke on the
>
>    xmlns:xml="http://www.w3.org/XML/1998/namespace"
>
>declaration. The spec at http://www.w3.org/TR/REC-xml-names/
>also suggests that the xml: prefixed namespace should have been defined
>implicitly.
>
>Thanks,
>-Arvola
>
>-----Original Message-----
>From: David Fischer <david@drummondgroup.com>
>To: Arvola Chan <arvola@tibco.com>; Cliff Collins <collinsc@sybase.com>;
>ebxml-msg <ebxml-msg@lists.oasis-open.org>
>Date: Wednesday, October 31, 2001 2:36 PM
>Subject: RE: [ebxml-msg] xml namespace
>
>
>Arvola,
>
>I thought as you did, but then I went to the namespace (click on the link)
>and I
>found this:
>
><documentation>This schema defines attributes and an attribute group
>suitable
>for use by schemas wishing to allow xml:lang or xml:space attributes on
>elements
>they define. To enable this, such a schema must first declare the XML
>namespace,
>and then import this schema for the XML namespace, e.g. as follows: <schema
>. .
>. xmlns:xml="http://www.w3.org/XML/1998/namespace"> . . . <import
>namespace="http://www.w3.org/XML/1998/namespace"
>schemaLocation="http://www.w3.org/2000/10/xml.xsd"/> Subsequently, qualified
>reference to either of the attributes or the group defined below will have
>the
>desired effect, e.g. <type . . .> . . . <attributeGroup
>ref="xml:specialAttrs"/>
>will define a type which will schema-validate a instance element with both
>xml:space and xml:lang attribute</documentation>
>
>The documentation above says ". . .such a schema must first declare the XML
>namespace. . ."
>
>So now I am confused.  Which way is right?  If some parsers understand
>"xml:"
>and some don't, then this won't work.
>
>Regards,
>
>David.
>
>
>-----Original Message-----
>From: Arvola Chan [mailto:arvola@tibco.com]
>Sent: Wednesday, October 31, 2001 2:44 PM
>To: David Fischer; Cliff Collins; ebxml-msg
>Subject: Re: [ebxml-msg] xml namespace
>
>
>More excerpt from http://www.w3.org/TR/REC-xml-names/
>
>"
>Namespace Constraint: Prefix Declared
>The namespace prefix, unless it is xml or xmlns, must have been declared in
>a namespace declaration attribute in either the start-tag of the element
>where the prefix is used or in an an ancestor element (i.e. an element in
>whose content the prefixed markup occurs). The prefix xml is by definition
>bound to the namespace name http://www.w3.org/XML/1998/namespace. The prefix
>xmlns is used only for namespace bindings and is not itself bound to any
>namespace name.
>"
>
>My reading of the above paragraph is that it is not necessary to add
>the line
>
>    xmlns:xml="http://www.w3.org/XML/1998/namespace"
>
>to the schema.
>
>-Arvola
>
>
>-----Original Message-----
>From: Arvola Chan <arvola@tibco.com>
>To: David Fischer <david@drummondgroup.com>; Cliff Collins
><collinsc@sybase.com>; ebxml-msg <ebxml-msg@lists.oasis-open.org>
>Date: Wednesday, October 31, 2001 12:35 PM
>Subject: Re: [ebxml-msg] xml namespace
>
>
>>David:
>>
>>On the contrary, I have experienced with a number of XML parsers
> >and validators that would choke on such a declaration. These include
>>Microsoft's Internet Explorer and TIBCO's Extensibility XML
>>Authority/Instance products.
>>
>>http://www.w3.org/TR/REC-xml-names/ states:
>>
>>Namespace Constraint: Leading "XML"
>>Prefixes beginning with the three-letter sequence x, m, l, in any case
>>combination, are reserved for use by XML and XML-related specifications.
>>
>>When I add the suggested line to the schema, I get the following
>>error from TIBCO Extensibility XML Authority:
>>
>>Parser Error. 'Illegal Namespace prefix: "xml".'
>>Namespace prefix should not start with 'xml' - that is reserved.
>>
>>Let's get a general agreement on whether the suggested line is needed
>>before posting the revised schema to the designated location.
>>
>>Regards,
>>-Arvola
>>
>>-----Original Message-----
>>From: David Fischer <david@drummondgroup.com>
>>To: Cliff Collins <collinsc@sybase.com>; ebxml-msg
>><ebxml-msg@lists.oasis-open.org>; Arvola Chan <arvola@tibco.com>
>>Date: Wednesday, October 31, 2001 12:18 PM
>>Subject: RE: [ebxml-msg] xml namespace
>>
>>
>>>Arvola, could you please add this to the schema?
>>>
>>> xmlns:xml="http://www.w3.org/XML/1998/namespace"
>>>
>>>Thanks,
>>>
>>>David Fischer
>>>Drummond Group.
>>>
>>>-----Original Message-----
>>>From: Cliff Collins [mailto:collinsc@sybase.com]
>>>Sent: Wednesday, October 31, 2001 1:28 PM
>>>To: ebxml-msg
>>>Subject: [ebxml-msg] xml namespace
>>>
>>>
>>>uri for xml namespace
>>>
>>>
>>>http://www.w3.org/XML/1998/namespace
>>>
>>>Cliff Collins
>>>mailto:collinsc@sybase.com
>>>URL: http://www.skyweyr.com/cliff
>>>(510)922-5204
>>>
>>>
>>>
>>>----------------------------------------------------------------
>>>To subscribe or unsubscribe from this elist use the subscription
>>>manager: <http://lists.oasis-open.org/ob/adm.pl>
>>>
>>
>
>
>
>----------------------------------------------------------------
>To subscribe or unsubscribe from this elist use the subscription
>manager: <http://lists.oasis-open.org/ob/adm.pl>
>
>
>Content-Type: application/octet-stream;
>	name="namespace.xsd"
>Content-Disposition: attachment;
>	filename="namespace.xsd"
>
>Attachment converted: Work:namespace.xsd (????/----) (0012A6D8)


-- 
Scott Vorthmann                     scottv@tibco.com
Senior Architect                     office: 919 969 6513
TIBCO Extensibility
TIBCO Software, Inc.              www.extensibility.com




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


Powered by eList eXpress LLC