Kobling af flere forskellige XSD'er i et.
Overordnet problemstilling:Jeg skal have koblet flere forskellige XSD'er sammen i et, hvilket jeg har forsøgt på i nedenstående:
<?xml version="1.0" encoding="UTF-8"?>
<schema
targetNamespace=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/"
xmlns:cc=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/"
xmlns:dkcc=
"http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/"
xmlns:brr=
"http://rep.oio.dk/bbr.dk/xml/schemas/2002/06/28/"
xmlns=
"http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<import namespace=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/"
schemaLocation="http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/CC_DistrictName.xsd"/>
<import namespace=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/" schemaLocation="http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/CC_BuildingIdentifier.xsd"/>
<import namespace=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/" schemaLocation="http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/CC_FloorIdentifier.xsd"/>
<import namespace=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/" schemaLocation="http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/CC_TownName.xsd"/>
<import namespace=
"http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/"
schemaLocation="http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/DKCC_PostCodeIdentifier.xsd"/>
<import namespace=
"http://rep.oio.dk/bbr.dk/xml/schemas/2002/06/28/" schemaLocation="http://rep.oio.dk/bbr.dk/xml/schemas/2002/06/28/BBR_HouseNumberCharacter.xsd"/>
<element name="Address">
<complexType name="AddressSpecificType">
<sequence>
<element ref="cc:DistrictName" minOccurs="0"/>
<element ref="cc:BuildingIdentifier" minOccurs="0"/>
<element ref="cc:FloorIdentifier" minOccurs="0"/>
<element ref="cc:TownName" minOccurs="0"/>
<element ref="dkcc:PostCodeIdentifier" minOccurs="0"/>
<element ref="brr:HouseNumberCharacter" minOccurs="0"/>
</sequence>
</complexType>
</element>
</schema>
Når jeg validerer mit XML-dokument kommer der en fejl i <HouseNumberCharacter></HouseNumberCharacter> i nedenstående XML-dokument. Det er vist fordi den ikke tilgår stierne i det ovenstående schema.
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Mogens Hansen (student)-->
<Address
xmlns=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/" xmlns:cc=
"http://rep.oio.dk/ebxml/xml/schemas/cc/2003/02/17/" xmlns:dkcc="http://rep.oio.dk/ebxml/xml/schemas/dkcc/2003/02/13/"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=
"http://rep.oio.dk/cpr.dk/xml/schemas/core/2002/06/28/
H:\P8\Adrschema.xsd">
<DistrictName>sfdsf</DistrictName>
<BuildingIdentifier>sdfsdf</BuildingIdentifier>
<FloorIdentifier>2</FloorIdentifier>
<TownName></TownName>
<HouseNumberCharacter></HouseNumberCharacter>
<PostCodeIdentifier></PostCodeIdentifier>
</Address>
Er der nogle der kan hit ud af det?