Auf Thema antworten

@Wildcard: sorry for disturbing you but i can not jet import namespace "http://www.w3.org/2001/XMLSchema". that comes errors:


[code=Java]schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the

 document is not <xsd:schema>.[/code]


That may be because i have already import another namespace (i muss import another namespace to define element "EventTypeID" before, see schema unter). Can this be reason for the problem. Can we import multi namespace to a schema? (I have search many sites but there are no clear answer) and muss we also set a schemaLocation for the namespace  "http://www.w3.org/2001/XMLSchema" ?

Thanks for your help



[code=Java]

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

<xsd:schema xmlns="www.congdong.de" xmlns:cep="www.congdong.de" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified" jaxb:version="2.0" targetNamespace="www.congdong.de">


<xsd:import namespace="http://www.w3.org/2001/XMLSchema"/> 

<xsd:import namespace="http://congdong.de/wsn/t-1"> schemaLocation="t-1.xsd" </xsd:import>


     <xsd:element name="TestRequest">

        <xsd:complexType>

            <xsd:sequence maxOccurs="unbounded" minOccurs="1">

                <xsd:element name="eventTest" type="cep:EventTest"/>

            </xsd:sequence>

        </xsd:complexType>

        <xsd:key name="eventTypeIdMustBeUnique">

            <xsd:selector xpath="cep:eventTest"/>

            <xsd:field xpath="cep:eventTypeId"/>

        </xsd:key>

    </xsd:element>

    <xsd:complexType name="EventTest">

        <xsd:sequence>

            <xsd:element name="eventTypeId" type="cep:EventTypeId">

            </xsd:element>

            <xsd:element name="pattern" type="xsd:string"/>

            <xsd:element ref="xsd:schema">

                        <xsd:annotation>

                            <xsd:appinfo>

            <jaxb:dom/>

          </xsd:appinfo>

                        </xsd:annotation>

            </xsd:element>

        </xsd:sequence>

    </xsd:complexType>

   

 </xsd:schema>

[/code]



Oben