Hi,
thanks for answering.
With "standard prefix" I did not mean, that I
haven't specified which namespace belongs to the prefix.
But during trying out my error-message has
changed:
Grammar with uri : http://www.xyz.de, can not found
<?xml version="1.0"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema" xmlns = "http://www.xyz.de" targetNamespace= "http://www.xyz.de> <xsd:element
name="bausparAntrag">
<complexType>
...
The Instance:
<?xml version="1.0"
standalone="no"?>
<bausparAntrag xmlns ="http://www.profi-consult.de" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="bausparAntrag.xsd"> <produkt> Or with this variant, the error is:
Element type "bausparAntrag" must be declared.
The Schema:
<?xml version="1.0"
encoding="UTF-8"?>
<schema xmlns='http://www.w3.org/2000/10/XMLSchema'> <element name="bausparAntrag"> <complexType> The Instance:
<?xml version="1.0"
standalone="no"?>
<bausparAntrag xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:noNamespaceSchemaLocation="bausparAntrag.xsd"> <produkt> With the second variant namespace problems are
gone. But why doesn't the parser know the root-Element. It is declared in the
Schema, syntax conformas to the last version of w3c. I tried to use xerces, as
it knows xmlschemas best, but I'm not sure whether I'm really using it. I set
the system-property in my java-code:
System.setProperty("javax.xml.parsers.DocumentBuilderFactory" ,
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
Maybe that does not work??
If It all works that fine in your applications,
than a code example would be quite helpful!
Thanks
Inga
|