I think http://www.w3.org/2001/xml.xsd has a bug , so why don't u try with attached one.
and change your schemaLocation to

    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
    http://www.w3.org/2001/XMLSchema.xsd
    http://www.w3.org/XML/1998/namespace
    xml.xsd"   
 
hope this works....
regards
Anoop Singh
 
 
----- Original Message -----
From: "Minh Kama Yie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 7:05 AM
Subject: handling of "xml:lang" attribute.

Hi List,

I'm relatively new to xerces so please let me know if I'm completely on the
wrong track. I've posted a similar question on the user list but have come
across some issues that maybe more relevant on the dev list.

I'm working off the xerces 1.4.3 code base and am parsing an XML Schema
document as follows:

<?xml version = "1.0" encoding = "UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
   
http://www.w3.org/2001/XMLSchema.xsd
    http://www.w3.org/XML/1998/namespace
    http://www.w3.org/2001/xml.xsd"
    targetNamespace="http://jetty.coxless.com/schema/tmp"
    xmlns:my-prefix="http://jetty.coxless.com/schema/tmp">

    <xsd:element name="form">
        <xsd:simpleType>
    <xsd:union memberTypes="xsd:string"/>
        </xsd:simpleType>
    </xsd:element>

</xsd:schema>


Whilst parsing this document with validation on it seems as if it attempts to
resolve the uri prefix for the xml:lang attribute. As I understand it, it
seems as if this is against the XML 1.0 REC.
Please let me know if I'm doing something wrong or if it is actually a bug
and I can hence start developing a patch for it.

The actual stack trace is:

org.xml.sax.SAXParseException: Schema error: prefix : [xml] cannot be
resolved to a URI.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1204)
at
org.apache.xerces.validators.schema.TraverseSchema.reportSchemaError(TraverseSchema.java:8938)
at
org.apache.xerces.validators.schema.TraverseSchema.reportGenericSchemaError(TraverseSchema.java:8925)
at
org.apache.xerces.validators.schema.TraverseSchema.resolvePrefixToURI(TraverseSchema.java:509)
at
org.apache.xerces.validators.schema.TraverseSchema.traverseAttributeDecl(TraverseSchema.java:5905)
at
org.apache.xerces.validators.schema.TraverseSchema.traverseAttributeGroupDecl(TraverseSchema.java:6403)
at
org.apache.xerces.validators.schema.TraverseSchema.doTraverseSchema(TraverseSchema.java:751)
at
org.apache.xerces.validators.schema.TraverseSchema.<init>(TraverseSchema.java:547)
at
org.apache.xerces.validators.schema.TraverseSchema.traverseImport(TraverseSchema.java:2026)
at
org.apache.xerces.validators.schema.TraverseSchema.doTraverseSchema(TraverseSchema.java:728)
at
org.apache.xerces.validators.schema.TraverseSchema.<init>(TraverseSchema.java:547)
at
org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar(XMLValidator.java:2783)
at
org.apache.xerces.validators.common.XMLValidator.parseSchemas(XMLValidator.java:2669)
at
org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElementAndAttributes(XMLValidator.java:2610)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1152)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:949)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:195)



--
Regards,

Minh Kama Yie
Nuix

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: xml.xsd
Description: Binary data

-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to