[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
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
|
- From: "Scott Vorthmann" <scottv@tibco.com>
- To: "Arvola Chan" <arvola@tibco.com>
- Date: Thu, 1 Nov 2001 08:39:00 -0500
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