Inhaltsverzeichnis
Inhaltsverzeichnis
SuperUser: root
Root-Passwort:(passwd)
User geronimo: Passwort: geronimo
User für alle Arbeiten am Projekt xml2sql inkl. Protokoll, Bericht und Installationsanleitungen.
User postgres: Passwort: postgres
home-Verzeichnis: /usr/local/pgsql
Heimatverzeichnis der Datenbank PostgreSQL inkl. aller Konfigurationen und Datenbanken. postmaster bzw. postgres, der Startprozess, muss vom User: postgres gestartet werden!
Sonstige Passwörter: Passwort entspricht immer dem Usernamen.
Verzeichnisse xml: /home/geronimo/apache/xml:
In diesem Verzeichnis liegen alle selbstgebauten Files.
projekt_anp/protokoll/(monat)/(datum).xml: Die Tagesprotokolle
projekt_anp/Projektbericht/bericht1: Zwischenbericht xml2sql
projekt_anp/Projektbericht/bericht2: Abschlussbericht xml2sql
projekt_anp/xml2sql: Alle Testfiles und Stylesheets des eigentlichen Projektes
LDAP/: Installationsanleitung und Testfiles für das LDAP-Modul von Cocoon
cocoon_sql/: Testfiles und Übungen zum SQL-Modul von Cocoon und zu sql allgemein
Apache
/usr/local/apache2/conf/httpd.conf
Tomcat
/usr/local/jakarta/dist/tomcat/conf/jakarta.conf
server.xml
web.xml
workers.xml
Cocoon
/usr/local/jakarta/dist/tomcat/webapps/cocoon/WEB-INF/web.xml
cocoon.properties
Relevante Systemverzeichnisse werden fett ausgegeben.
Beispiel:
/usr/local/lib
Befehle erscheinen inline in Originalschrift.
Beispiel:
./configure
Listings erscheinen in Originalschrift als eigener Absatz.
Beispiel:
#! /bin/sh ./configure \ --prefix=/usr/local/apache \ --enable-rule=SHARED_CORE \ --enable-module=so
Inhaltsverzeichnis
Im Rahmen einer Fortbildung zum Multimedia/Internet-Programmierer eignet sich der Projektführende die Auszeichnungssprache XML an sowie den Umgang mit SQL und das Erstellen relationaler Datenbankdesigns.
Methode und Nutzen der Erzeugung relationaler Datenbankdesigns aus einem XML-File und die Abbildung von XML-Daten darauf zum
Zwecke der Erhebung, Speicherung und jederzeitigen Verfügbarkeit der Daten sind
geklärt.
Der Umgang mit XML und die Umwandlung von .xsl-Dateien mittels XSL/XSLT-Stylesheets in verschiedene Ausgabeformate ist zur Routine geworden.
Inhaltsverzeichnis
Inhaltsverzeichnis
Inhaltsverzeichnis
Das Projekt xml2sql wurde durchgeführt im Rahmen einer Fortbildung zum Internet/Multimedia-Designer und endet entsprechend mit dieser Maßnahme. Zu seiner Durchführung waren die Einarbeitung in nicht triviale Installationen diverser benötigter Software, in XML und XSLT sowie in SQL notwendig.
Inhaltsverzeichnis
Die Umsetzung erfolgte mit dem W3C-Standard XSLT. Mit einer xml-Datei als Datenquelle ergeben sich folgende Schlussfolgerungen:
Die Durchführung des Projektes orientiert sich an einem Fallbeispiel, das in:
XML Professionell, Richard Anderson et al, mitp Verlag, Bonn 2000
Die dort ab Seite 461 gestellten Forderungen für die Umsetzung von XML in SQL lassen sich bis zur Regel 3 erfüllen:
Sobald eine neue Tabelle erstellt wird, soll auch ein Schlüssel mit demselben Namen erstellt werden, der Das Präfix pk_ trägt. Diese Spalte soll vom Datentyp automatically-incremented sein. Für Postgresql heißt das: SERIAL PRIMARY KEY
Für jeden Elementtyp-Knoten erzeugen wir eine eigene Tabelle mit dem Namen des Elements. Anschließend bleibt noch folgendes zu tun:
Die xml-Quelle:
projekt_anp/xml2sql/dbdesign4/book04.xml
<?xml version="1.0"?> <?xml-stylesheet version="1.0" href="books05.xsl" type="text/xsl"?> <?cocoon-process type="xslt"?> <books name="books"> <book category="reference"> <author>Nigel Rees</author> <title>Sayings of the Century</title> <price>8.95</price> </book> <book category="fiction"> <author>Evelyn Waugh</author> <title>Sword of Honour</title> <price>12.99</price> </book> <book category="fiction"> <author>Herman Melville</author> <title>Moby Dick</title> <price>8.99</price> </book> </books>
Die Regeln 1 und 2 werden umgesetzt mit folgendem Stylesheet:
projekt_anp/xml2sql/dbdesign4/book02.xsl
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:processing-instruction name="cocoon-format"> type="text/plain" </xsl:processing-instruction> <php> <!-- Root-Element; ohne dem geht es nicht!--> <xsl:apply-templates/> </php> </xsl:template> <xsl:template match="child::*"> <xsl:variable name="name1" select="string(name(*[1]))"/> <xsl:variable name="name2" select="string(name(*[2]))"/> <xsl:variable name="name3" select="string(name(*[3]))"/> CREATE TABLE <xsl:value-of select="name()"/>( <xsl:if test= "$name1 != $name3 and $name2"> <xsl:value-of select="name(*[1])"/> CHAR(10), </xsl:if> <xsl:if test= "$name2 != $name3 and $name1"> <xsl:value-of select="name(*[2])"/> CHAR(10), </xsl:if> <xsl:if test= "$name3 != $name1 and $name2"> <xsl:value-of select="name(*[3])"/> CHAR(10), </xsl:if> pk_<xsl:value-of select="name()"/> SERIAL PRIMARY KEY ); <xsl:if test= "$name1 != $name3 and $name2"> CREATE TABLE <xsl:value-of select="name(*[1])"/> ( fk_<xsl:value-of select="name()"/> INTEGER REFERENCES <xsl:value-of select="name()"/>, pk_<xsl:value-of select="name(*[1])"/> SERIAL PRIMARY KEY ); </xsl:if> <xsl:if test= "$name2 != $name3 and $name1"> CREATE TABLE <xsl:value-of select="name(*[2])"/> ( fk_<xsl:value-of select="name()"/> INTEGER REFERENCES <xsl:value-of select="name()"/>, pk_<xsl:value-of select="name(*[2])"/> SERIAL PRIMARY KEY ); </xsl:if> <xsl:if test= "$name3 != $name1 and $name2"> CREATE TABLE <xsl:value-of select="name(*[3])"/> ( fk_<xsl:value-of select="name()"/> INTEGER REFERENCES <xsl:value-of select="name()"/>, pk_<xsl:value-of select="name(*[3])"/> SERIAL PRIMARY KEY ); </xsl:if> </xsl:template> </xsl:stylesheet>Daraus ergibt sich die sql-Eingabesequenz:
CREATE TABLE books(
reference CHAR(10),
fiction CHAR(10),
pk_books SERIAL PRIMARY KEY
);
CREATE TABLE reference (
fk_books INTEGER REFERENCES books,
pk_reference SERIAL PRIMARY KEY
);
CREATE TABLE fiction (
fk_books INTEGER REFERENCES books,
pk_fiction SERIAL PRIMARY KEY
);
Auch Regel Nr. 3 aus Professional XML lässt sich noch umsetzen:
Für jeden Attribut-Knoten:
Die xml-Quelle:
projekt_anp/xml2sql/dbdesign5/books02.xml
<?xml version="1.0"?> <?xml-stylesheet version="1.0" href="books03.xsl" type="text/xsl"?> <?cocoon-process type="xslt"?> <books> <book bookid="1" pubdate="01/03/1999"> <title>Professional ADSI CDO Programming with ASP</title> <authors> <author>Mikael Freidlitz</author> <author>Todd Mondor</author> </authors> <subject>ASP</subject> </book> <book bookid="2" pubdate="11/10/2000"> <title>Professional Site Server 3.0</title> <title>UnProfessional Site Server 3.0</title> <authors> <author>Nick Apostolopoulos</author> <author>Joey Bernal</author> <author>Steve Edens</author> <author>Robert Howard</author> <author>Stephen Howard</author> <author>Mike Kendzierski</author> <author>Steven Livingstone</author> <author>Craig McQueen</author> <author>Marco Tabini</author> <author>Alex Toussaint</author> <author>Peter Watt</author> </authors> <subject>Commerce</subject> </book> <book bookid="3" pubdate="11/12/1999"> <title>Professional MTS & MSMQ Programming with VB and ASP</title> <authors> <author>Alex Homer</author> <author>David Sussman</author> </authors> <subject>IIS</subject> </book> <book bookid="4" pubdate="02/07/1998"> <title>Professional MFC with Visual C++ 6</title> <authors> <author>Mike Blaszczak</author> </authors> <subject>C++</subject> </book> <book bookid="5" pubdate="11/12/1999"> <title>Site Server 3.0 Personalization and Membership</title> <authors> <author>Robert Howard</author> </authors> <subject>Site Server</subject> </book> </books>
Das xsl-Stylesheet, mit dem Regel 3 umgesetzt wird:
projekt_anp/xml2sql/dbdesign5/books03.xsl
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:processing-instruction name="cocoon-format"> type="text/plain" </xsl:processing-instruction> <php> <!-- Root-Element; ohne dem geht es nicht!--> <xsl:apply-templates/> </php> </xsl:template> <xsl:template match="child::*"> CREATE TABLE <xsl:value-of select="name()"/>( <xsl:for-each select="@*"> <xsl:value-of select="name()"/> CHAR(15), </xsl:for-each> <xsl:for-each select="*"> <xsl:value-of select="name()"/><xsl:value-of select="@*[1]"/> CHAR(10), </xsl:for-each>pk_<xsl:value-of select="name()"/> SERIAL PRIMARY KEY ); <xsl:for-each select="*"> <xsl:variable name="name1" select="string(name(*[1]))"/> <xsl:variable name="name2" select="string(name(*[2]))"/> <xsl:variable name="name3" select="string(name(*[3]))"/> <xsl:variable name="name4" select="string(name(*[4]))"/> <xsl:variable name="name5" select="string(name(*[5]))"/> CREATE TABLE <xsl:value-of select="name()"/> <xsl:value-of select="@*[1]"/> (<xsl:for-each select="@*"> attr_<xsl:value-of select="name()"/> CHAR(15) NOT NULL,</xsl:for-each> fk_<xsl:value-of select="name(..)"/> INTEGER REFERENCES <xsl:value-of select="name()"/>, <xsl:if test="name(*[1]) != name(*[2])"> <xsl:for-each select="*[text()]"> elem_<xsl:value-of select="name()"/> CHAR(18), </xsl:for-each></xsl:if>pk_<xsl:value-of select="name()"/> SERIAL PRIMARY KEY ); </xsl:for-each> </xsl:template> </xsl:stylesheet>
Damit wird folgende .sql-Eingabesequenz generiert:
projekt_anp/xml2sql/dbdesign5/books03.sql
CREATE TABLE books(
book1 CHAR(10),
book2 CHAR(10),
book3 CHAR(10),
book4 CHAR(10),
book5 CHAR(10),
pk_books SERIAL PRIMARY KEY
);
CREATE TABLE book1 (
attr_bookid CHAR(15) NOT NULL,
attr_pubdate CHAR(15) NOT NULL,
fk_books INTEGER REFERENCES book,
elem_title CHAR(18),
elem_subject CHAR(18),
pk_book SERIAL PRIMARY KEY
);
CREATE TABLE book2 (
attr_bookid CHAR(15) NOT NULL,
attr_pubdate CHAR(15) NOT NULL,
fk_books INTEGER REFERENCES book,
pk_book SERIAL PRIMARY KEY
);
CREATE TABLE book3 (
attr_bookid CHAR(15) NOT NULL,
attr_pubdate CHAR(15) NOT NULL,
fk_books INTEGER REFERENCES book,
elem_title CHAR(18),
elem_subject CHAR(18),
pk_book SERIAL PRIMARY KEY
);
CREATE TABLE book4 (
attr_bookid CHAR(15) NOT NULL,
attr_pubdate CHAR(15) NOT NULL,
fk_books INTEGER REFERENCES book,
elem_title CHAR(18),
elem_subject CHAR(18),
pk_book SERIAL PRIMARY KEY
);
CREATE TABLE book5 (
attr_bookid CHAR(15) NOT NULL,
attr_pubdate CHAR(15) NOT NULL,
fk_books INTEGER REFERENCES book,
elem_title CHAR(18),
elem_subject CHAR(18),
pk_book SERIAL PRIMARY KEY
);
<!-- This page was served in 35 milliseconds by Cocoon 1.8.2 -->
Enthält ein Element nur Text, und tritt das Element nur ein Mal auf, dann erstellen wir eine Spalte in der Tabelle des Eltern-Elementes und geben der Spalte den Namen des Elementes und das Präfix elem_
Diese Regel ließ sich direkt aus der xml-Datenquelle heraus nicht umsetzen. Dazu sind die Möglichkeiten von xslt als Programmiersprache zu begrenzt.
Inhaltsverzeichnis
XML:Schema beschreibt die Struktur eines .xml-Dokumentes im XML-Format, anders als eine DTD. XML:Schema ist noch Candidate Recommendation des W3C (s. http://www.w3.org/TR) und entsprechend neu. Als Software wurde XMLAuthority (http://www.extensibility.com/tibco/solutions/xml_authority/index.htm) verwendet, um XML:Schemata zu erzeugen.
Die Umsetzung von XML:Schema nach SQL erbrachte folgende Ergebnisse:
Runterladen der Sourcen von:
http://www.extensibility.com/tibco/solutions/xml_authority/index.htm
nach: /home/software/xml/authority
Verzeichnis erzeugen: /usr/local/authority und den heruntergeladenen File XA_21-linux.tar.gz dorthin kopieren.
Auspacken mit tar -xzf
Es entsteht das Verzeichnis: TIBCOExtensibiltity, das nach /usr/local kopiert wird. /usr/local/authority wird wieder gelöscht.
Es gibt eine ausführbare Datei: setup.sh. . Es wird einiges abgefragt, u.a. der Registration Code: 1FFC-0212-CC84-CCCB.
Anschließend wird von: /home/geronimo/TIBCOExtensibility/XMLAuthority/XA/xa ein symbolisches Link gesetzt nach /usr/local/bin, damit XMLAuthority allgemein zur Verfügung steht. Starten tut es zunächst seinem Heimatverzeichnis, das lässt sich ab er einstellen.
Inhaltsverzeichnis
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema01.xml
<?xml version="1.0"?> <?xml-stylesheet version="1.0" href="books03.xsl" type="text/xsl"?> <?cocoon-process type="xslt"?> <books> <book bookid="1" pubdate="01/03/1999"> <title>Professional ADSI CDO Programming with ASP</title> <authors> <author>Mikael Freidlitz</author> <author>Todd Mondor</author> </authors> <subject>ASP</subject> </book> <book bookid="2" pubdate="11/10/2000"> <title>Professional Site Server 3.0</title> <title>UnProfessional Site Server 3.0</title> <authors> <author>Nick Apostolopoulos</author> <author>Joey Bernal</author> <author>Steve Edens</author> <author>Robert Howard</author> <author>Stephen Howard</author> <author>Mike Kendzierski</author> <author>Steven Livingstone</author> <author>Craig McQueen</author> <author>Marco Tabini</author> <author>Alex Toussaint</author> <author>Peter Watt</author> </authors> <subject>Commerce</subject> </book> <book bookid="3" pubdate="11/12/1999"> <title>Professional MTS & MSMQ Programming with VB and ASP</title> <authors> <author>Alex Homer</author> <author>David Sussman</author> </authors> <subject>IIS</subject> </book> <book bookid="4" pubdate="02/07/1998"> <title>Professional MFC with Visual C++ 6</title> <authors> <author>Mike Blaszczak</author> </authors> <subject>C++</subject> </book> <book bookid="5" pubdate="11/12/1999"> <title>Site Server 3.0 Personalization and Membership</title> <authors> <author>Robert Howard</author> </authors> <subject>Site Server</subject> </book> </books>Daraus macht XMLAuthority das xml:Schema, mit dem im folgenden gearbeitet wird.
Aus xml Professional, S. 461:
Regel 1: Sobald eine neue Tabelle erstellt wird, soll auch ein Schlüssel mit demselben Namen erstellt werden, der das präfix "`_pk"' trägt. Diese Spalte sollte ein Datentyp automatically-incremented Integer sein.
Zunächst braucht es zur Verwendung von xml:Schema den richtigen Header. Dazu muss in jeder <xsd:element>-angabe das xsd: eliminiert werden. Das Ergebnis sieht so aus:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema01.xml
<?xml version="1.0"?> <?xml-stylesheet href="schema01.xsl" type="text/xsl"?> <?cocoon-process type="xslt"?> <!--Generated by XML Authority. Conforms to w3c http://www.w3.org/2000/10/XMLSchema--> <schema xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema"> <element name = "books"> <complexType> <sequence> <element ref = "book" maxOccurs = "unbounded"/> </sequence> </complexType> </element> <element name = "book"> <complexType> <sequence> <element ref = "title" maxOccurs = "unbounded"/> <element ref = "authors"/> <element ref = "subject"/> </sequence> <attribute name = "pubdate" use = "required" type = "string"/> <attribute name = "bookid" use = "required" type = "string"/> </complexType> </element> <element name = "title"> <complexType mixed = "true"> <choice/> </complexType> </element> <element name = "authors"> <complexType> <sequence> <element ref = "author" maxOccurs = "unbounded"/> </sequence> </complexType> </element> <element name = "author"> <complexType mixed = "true"> <choice/> </complexType> </element> <element name = "subject"> <complexType mixed = "true"> <choice minOccurs = "0" maxOccurs = "unbounded"/> </complexType> </element> </schema>
Die Umsetzung der Regel 1 erfolgt mit diesem Stylesheet:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema01.xsl
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:template match="schema"> <xsl:processing-instruction name="cocoon-format"> type="text/plain" </xsl:processing-instruction> <sql> <!-- Root-Element; ohne dem geht es nicht!--> <xsl:apply-templates/> </sql> </xsl:template> <xsl:template match="element"> CREATE TABLE <xsl:value-of select="@name"/>( pk_<xsl:value-of select="@name"/>.id SERIAL PRIMARY KEY ); </xsl:template> </xsl:stylesheet>
Das ergibt folgende sql-Eingabesequenz:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema01.sql
CREATE TABLE books(
pk_books.id SERIAL PRIMARY KEY
);
CREATE TABLE book(
pk_book.id SERIAL PRIMARY KEY
);
CREATE TABLE title(
pk_title.id SERIAL PRIMARY KEY
);
CREATE TABLE authors(
pk_authors.id SERIAL PRIMARY KEY
);
CREATE TABLE author(
pk_author.id SERIAL PRIMARY KEY
);
CREATE TABLE subject(
pk_subject.id SERIAL PRIMARY KEY
);
<!-- This page was served in 36 milliseconds by Cocoon 1.8.2 -->
Damit ist die erste Regel erfüllt.
Aus Professional XML, S. 461:
Regel 2: Für jeden Element-Knoten erzeigen wir eine eigene Tabelle mit dem Namen des Elementes. Danach bleibt noch folgendes zu tun:
Die Lösung für die xml-Datei von oben (schema01.xml) sieht so aus:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema02.xsl
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:processing-instruction name="cocoon-format"> type="text/plain" </xsl:processing-instruction> <sql> <!-- Root-Element; ohne dem geht es nicht!--> <xsl:apply-templates/> </sql> </xsl:template> <xsl:template match="element"> CREATE TABLE <xsl:value-of select="@name"/>( <xsl:for-each select="complexType/sequence/element"> fk_<xsl:value-of select="@ref"/> INTEGER REFERENCES, </xsl:for-each>pk_<xsl:value-of select="@name"/>.id SERIAL PRIMARY KEY ); </xsl:template> </xsl:stylesheet>
Das ergibt die sql-Eingabesequenz:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema02.sql
CREATE TABLE books(
fk_book INTEGER REFERENCES,
pk_books.id SERIAL PRIMARY KEY
);
CREATE TABLE book(
fk_title INTEGER REFERENCES,
fk_authors INTEGER REFERENCES,
fk_subject INTEGER REFERENCES,
pk_book.id SERIAL PRIMARY KEY
);
CREATE TABLE title(
pk_title.id SERIAL PRIMARY KEY
);
CREATE TABLE authors(
fk_author INTEGER REFERENCES,
pk_authors.id SERIAL PRIMARY KEY
);
CREATE TABLE author(
pk_author.id SERIAL PRIMARY KEY
);
CREATE TABLE subject(
pk_subject.id SERIAL PRIMARY KEY
);
<!-- This page was served from cache in 1 milliseconds by Cocoon 1.8.2 -->
Regel 3: Für jeden Attribut-Knoten:
Die verlangten Funktionen sind in xml:Schema schon angelegt:
<attribute name = "pubdate" use = "required" type = "string"/>
Damit lassen sich die Erfordernisse der Regel 3 recht einfach erfüllen. Ausgangsdatei ist immer noch schema01.xml
Die Lösung für die xml-Datei von oben (schema01.xml) sieht so aus:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema03.xsl
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:processing-instruction name="cocoon-format"> type="text/plain" </xsl:processing-instruction> <sql> <!-- Root-Element; ohne dem geht es nicht!--> <xsl:apply-templates/> </sql> </xsl:template> <xsl:template match="element"> CREATE TABLE <xsl:value-of select="@name"/>( <xsl:for-each select="complexType/sequence/element"> fk_<xsl:value-of select="@ref"/> INTEGER REFERENCES, </xsl:for-each> <xsl:for-each select="complexType/attribute"> attr_<xsl:value-of select="@name"/> VARCHAR <xsl:if test="@use ='required'">NOT NULL</xsl:if>, </xsl:for-each>pk_<xsl:value-of select="@name"/>.id SERIAL PRIMARY KEY ); </xsl:template> </xsl:stylesheet>
Daraus ergibt sich die SQL-Eingabesequenz:
/home/geronimo/xml/projekt_anp/xml2sql/schema2/schema03.sql
CREATE TABLE books(
fk_book INTEGER REFERENCES,
pk_books.id SERIAL PRIMARY KEY
);
CREATE TABLE book(
fk_title INTEGER REFERENCES,
fk_authors INTEGER REFERENCES,
fk_subject INTEGER REFERENCES,
attr_pubdate VARCHAR NOT NULL,
attr_bookid VARCHAR NOT NULL,
pk_book.id SERIAL PRIMARY KEY
);
CREATE TABLE title(
pk_title.id SERIAL PRIMARY KEY
);
CREATE TABLE authors(
fk_author INTEGER REFERENCES,
pk_authors.id SERIAL PRIMARY KEY
);
CREATE TABLE author(
pk_author.id SERIAL PRIMARY KEY
);
CREATE TABLE subject(
pk_subject.id SERIAL PRIMARY KEY
);
<!-- This page was served in 27 milliseconds by Cocoon 1.8.2 -->
Aus XML Professional, S. 464:
Regel 4: Ist ein Element ein Text-Element und tritt nur ein Mal auf, dann erzeugen wir eine Spalte in der Tabelle des Eltern-Elementes und geben der Spalte den Namen des Elementes und das Präfix: elem_
Es konnte keine Möglichkeit gefunden werden, dafür einen Testalgorithmus in XSLT/XPATH zu schreiben. Nötig wäre es, die Gleichheit von
element/complexType/sequence/element[@ref] mit:
element[@name] zu testen und gleichzeitig das Vorkommen von:
complexType[@mixed ='true'].
Das ist trotz mehrerer Anläufe mit XSLT nicht gelungen.
Inhaltsverzeichnis