Hallo zusammen,
ich möchte mir eine XSD-Datei definieren basierend auf dem Element para der Dockbook-XSD-Datei (http://docbook.org/xml/5.0/xsd/docbook.xsd). Leider schaffe ich es nicht in meiner XSD-Datei Elemente aus der Docbook-XSD-Datei aufzurufen:
Leider kann der Typ docbookara (Typ des letzten Elements docbook-para) nicht gefunden werden:
Ist es überhaupt möglich, Elemente aus einer fremden XSD-Datei in einer eigenen XSD-Datei zu referenzieren? Falls dies möglich ist, dann würde ich mich über eine Minimalanleitung freuen.
Vielen Dank
Eure Aness
ich möchte mir eine XSD-Datei definieren basierend auf dem Element para der Dockbook-XSD-Datei (http://docbook.org/xml/5.0/xsd/docbook.xsd). Leider schaffe ich es nicht in meiner XSD-Datei Elemente aus der Docbook-XSD-Datei aufzurufen:
Code:
<?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://hso.biotronik.com/documentation" xmlns:documentation="http://hso.biotronik.com/documentation"> <!--add schema with different target namespace--> <xs:import namespace="http://docbook.org/xml/5.0/xsd" schemaLocation="docbook.xsd"/> <xs:element name="report-article"> <xs:complexType> <xs:sequence> <xs:element ref="documentation:long-description" minOccurs="1" maxOccurs="1" /> <xs:element ref="documentation:customer" maxOccurs="1" minOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="long-description"> <xs:annotation> <xs:documentation>long description of the report (purpose, result, data processing)</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="docbook-para" maxOccurs="unbounded" minOccurs="1" /> <xs:element ref="documentation:algorithm" maxOccurs="1" minOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="algorithm" type="documentation:docbookParaType"> <xs:annotation> <xs:documentation>description of the used algorithm</xs:documentation> </xs:annotation> </xs:element> <xs:element name="customer" type="documentation:docbookParaType"> <xs:annotation> <xs:documentation> recipient/s of the report </xs:documentation> </xs:annotation> </xs:element> <xs:complexType name="docbookParaType"> <xs:sequence> <xs:element ref="documentation:docbook-para" maxOccurs="unbounded" minOccurs="1" /> </xs:sequence> </xs:complexType> <xs:element name="docbook-para" type="docbook:para"/> </xs:schema>
Code:
s4s-att-invalid-value: Invalid attribute value for 'type' in element 'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 'docbook:para' as a QName: the prefix 'docbook' is not declared.
Vielen Dank
Eure Aness
Comment