- From: Priscilla Walmsley <priscilla@walmsley.com>
- Date: Fri, 17 Aug 2001 11:40:05 -0400
- To: "'komal mangtani'" <mkomal@bea.com>, <priscilla@walmsley.com>
- Cc: "'xml schema'" <xmlschema-dev@w3.org>
- Message-ID: <005501c12733$9dfeee70$1ab0153f@xmls>
Hi Komal, Yes, it looks like there is an error in this xml.xsd schema. If you absolutely can't upgrade to Xerces 1.4, I think the best thing you can do in the short term is make a local copy of the schema and correct it (by adding the use="default" attribute), and import that copy instead. Priscilla -----Original Message----- From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org]On Behalf Of komal mangtani Sent: Friday, August 10, 2001 1:31 PM To: priscilla@walmsley.com Cc: 'xml schema' Subject: Re: what is the replacement for xml:lang in CR version? Priscilla, I tried the one that you mentioned for schemaLocation, but get the same error: Schema error: Globally-declared attributes containing values MUST have "use" present and set to "FIXED" or "DEFAULT".> org.xml.sax.SAXParseException: Schema error: Globally-declared attributes containing values MUST have "use" present and set to "FIXED" or "DEFAULT". at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1090) this is the xsd snippet : <?xml version = "1.0" encoding = "UTF-8"?> <xsd:schema xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema" xmlns:xml = "http://www.w3.org/XML/1998/namespace" > <xsd:import namespace = "http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2000/10/xml.xsd" /> ........ Komal. Priscilla Walmsley wrote: Komal,If you change the schemaLocation to:<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2000/10/xml.xsd"/>it should include a previous version of xml.xsd which conforms to the CR rec.Priscilla WalmsleyVitria Technology -----Original Message----- From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org]On Behalf Of komal mangtani Sent: Thursday, August 09, 2001 10:10 PM To: Dave Carlson Cc: xml schema Subject: Re: what is the replacement for xml:lang in CR version? Assuming you are talking of xml schema specs, I am using xerces 1.3.1 which supports CR and not the final REC. I cannot upgrade to latest versions 1.4 for product-reasons, so does that mean I cannot use xml:lang until I move to REC supported parser? Komal. Dave Carlson wrote: Which schema validation tool are you using? It appears that you are not using a validator that is updated to the final recommendation. The use attribute with default or fixed was removed from the final spec. ----- Original Message ----- From:komal mangtani To: Eddie Robertsson Cc: Simon.Cox@csiro.au ; xml schema Sent: Thursday, August 09, 2001 11:30 AM Subject: Re: what is the replacement for xml:lang in CR version? when I import www.w3.org/2001/xml.xsd, i get error saying global attribute in xml.xsd should have use with value being default or fixed. Komal. Eddie Robertsson wrote: Hi, Simon Cox wrote: > xml:lang is /not/ a part of XML Schema, it is part of the XML instance language. > Thus, there is no change resulting from the evolution of the XML Schema specification. > > komal mangtani wrote: > > > > I have a schema that conforms to WD version and it has references to xml:lang. > > what is the equivalent in CR? > > > > here is the snippet: > > <element name = "FreeFormText"> > > <complexType content = "textOnly"> > > <attribute name = "xml:lang" type = "string"/> > > </complexType> > > </element> This is not the correct way of using it though.... If you want to use the xml:space or xml:lang attributes in your schema you have to declare them by reference and import the XML namespace from W3C. You can't "redeclare" the attributes as in the above schema. So, first you have to import the XML namespace using the import statement like: <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> You also have to add a namespace declaration on your xs:schema element. Like: <xs:schema ...xmlns:xml="http://www.w3.org/XML/1998/namespace"...>... No, you can reference the attributes defined by this namespace in your own schema using: <xs:attribute ref="xml:lang"/> Hope this helps. /Eddie
Received on Friday, 17 August 2001 11:43:13 UTC