Hi,
I have authored one schema containing any element and anyAttribute. Following is the schema
--------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ibm.com" xmlns
penContent="http://www.ibm.com">
<xsd:element name="opencontent">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="one" type="xsd:string"/>
<xsd:any minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
--------------------------------------------------------------------------
The following is the XML
--------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<OpenContent:opencontent xmlns:openContent= "http://www.ibm.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com OpenContent.xsd ">
<one>Hi</one>
<new namespace="##any">I am new element </new>
<flower/>
</OpenContent:opencontent>
--------------------------------------------------------------------------
When I am trying to validate it using the Xerces 2.5.x I am getting the followign error. It is able to capture the element content for the "<one>" element but it is throwing the following error at the "new" element
org.xml. sax. SAXParseException : cvc-complex-type.2.4.c: The matching
wildcard is strict, but no declaration can be found for element 'new'.
Following is the
java code snippet
ANY HELP IS HIGLY APPRECIATED.
Thx in advance.
Edit Comment: Disabled smiles in this post.
- m
[ May 02, 2005: Message edited by: Madhav Lakkapragada ]