Lehrer Nussbaumer - XML, XSL et cetera

XML

XSL

Anwendungen 

  1. XHTML
  2. MathML
  3. SVG
  4. StarOffice 6 / 7
  5. WAP / WML
  6. Diverse

Editoren

Parser u.a.

Schnittstellen


-----------------
letzte änderung:
09 December 2021
-----------------
Lehrer Nussbaumers Seite

... in Arbeit ...

StarOffice

OpenOffice- und StarOffice-Anwendungen ab der Version 6 speichern alle Daten im XML-Format. Um die Datenmenge klein zu halten, werden alle zu einem Office-Dokument gehörenden Dateien schließlich komprimiert.

Beispiel

Das OpenOffice/StarOffice-Textdokument "xmldoku.sxw" enthält lediglich eine Überschrift und einen kurzen Absatz. Wir geben den Inhalt der gepackten Datei auf der Konsole aus und erhalten:

Archive:  xmldoku.sxw
 Length   Method    Size  Ratio   Date   Time   CRC-32    Name
--------  ------  ------- -----   ----   ----   ------    ----
      30  Stored       30   0%  04-16-04 12:46  3931a5e1  mimetype
    1895  Defl:N      585  69%  04-16-04 12:46  fed67ce3  content.xml
    5702  Defl:N     1334  77%  04-16-04 12:46  8884e20e  styles.xml
    1054  Stored     1054   0%  04-16-04 12:46  3a01fc52  meta.xml
    6692  Defl:N     1466  78%  04-16-04 12:46  f4bb493c  settings.xml
     752  Defl:N      254  66%  04-16-04 12:46  11144701  META-INF/manifest.xml
--------          -------  ---                            -------
   16125             4723  71%                            6 files
xmldoku.sxw lines 1-11/11 (END) 

Der eigentliche Text-Inhalt ist in der Datei "content.xml" enthalten. Wir zeigen den Inhalt dieser Datei nach dem Entpacken des Archives "xmldoku.sxw" an:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd">
<office:document-content
     xmlns:office="http://openoffice.org/2000/office"
     xmlns:style="http://openoffice.org/2000/style"
     xmlns:text="http://openoffice.org/2000/text"
     xmlns:table="http://openoffice.org/2000/table"
     xmlns:draw="http://openoffice.org/2000/drawing"
     xmlns:fo="http://www.w3.org/1999/XSL/Format"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:number="http://openoffice.org/2000/datastyle"
     xmlns:svg="http://www.w3.org/2000/svg"
     xmlns:chart="http://openoffice.org/2000/chart"
     xmlns:dr3d="http://openoffice.org/2000/dr3d"
     xmlns:math="http://www.w3.org/1998/Math/MathML"
     xmlns:form="http://openoffice.org/2000/form"
     xmlns:script="http://openoffice.org/2000/script" office:class="text"
     office:version="1.0">
  <office:script/>
  <office:font-decls>
    <style:font-decl
	style:name="Andale Sans UI2"
	fo:font-family="'Andale Sans UI'"
	style:font-pitch="variable"/>
    <style:font-decl
	style:name="Andale Sans UI"
	fo:font-family="'Andale Sans UI'"
	style:font-family-generic="roman"
	style:font-pitch="variable"/>
    <style:font-decl
	style:name="Andale Sans UI1"
	fo:font-family="'Andale Sans UI'"
	style:font-family-generic="swiss"
	style:font-pitch="variable"/>
  </office:font-decls><office:automatic-styles/>
  <office:body>
    <text:sequence-decls>
     <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
     <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
     <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
     <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
    </text:sequence-decls>
    <text:h text:style-name="Heading 1" text:level="1">
      Überschrift
    </text:h>
    <text:p text:style-name="Text body">
      Dies ist ein sehr kleiner Absatz.
    </text:p>
  </office:body>
</office:document-content>

Hinweis: Der besseren Lesbarkeit wurden Zeilenschaltungen und Einrückungen im obigen Listing eingefügt. Tatsächlich enthält die XML-Datei keinen solchen Leerraum.

Aufgabe: Untersuche auch die übrigen XML-Dateien, die zum Textdokument "xmldoku.sxw" gehören!

OpenOffice-Anwendungen

Die Dateiendungen geben einen Hinweis darauf, dass OpenOffice/StarOffice im XML-Format speichert:

  • Textdokumente (writer) - Staroffice-XML-Writer (sxw)
  • Präsentations-Dokumente (impress) - Staroffice-XML-Impress (sxi)
  • Tabellendokumente (calc) - Staroffice-XML-Calc (sxc)
  • Zeichnungsdokumente (draw) - Staroffice-XML-Draw (sxd)
  • Formel-Dokumente (math) - Staroffice-XML-Math (sxm)
  • Globaldokument (global) - Staroffice-XML-Global (sxg)

Bei allen XML-Dateien werden zum Teil bestehende Namensräme (xsl-fo, svg, ...) oder eigene Namensräme verwendet.


© Alfred Nussbaumer, Weblog