Subject: [xsl] split OpenOffice 1.1 documents (flat xml) From: "Linnemann, Victor" <Linnemann@xxxxxxxxxxxxx> Date: Wed, 30 Jul 2003 15:50:51 +0200 |
Hello everybody, my question is about splitting large OpenOffice 1.1 documents (the content.xml that you will see once you unzipped the *.swx) into single chapters for translation purposes. It's flat xml, and because of this I already looked in the XSL-FAQ under http://www.dpawson.co.uk/xsl/sect2/flatfile.htm "Convert a flat XML document", but I was not able to apply the suggested solution to my problem. Each of the splitted files has to be a valid OpenOffice document and must contain exactly one chapter (begins with <text:h ...>bla</text:h> and ends with the next <text:h ...>bla</text:h>). *********************************************************** XML (sorry, very odd content): *********************************************************** <?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:script="http://openoffice.org/2000/script" office:class="text" office:version="1.0"> <office:script/> <office:font-decls> <style:font-decl style:name="Arial" fo:font-family="Arial" 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">Kapitel 1</text:h> <text:p text:style-name="Standard">Dies ist mein Dokument.</text:p> <text:h text:style-name="Heading 1" text:level="1">Kapitel 2</text:h> <text:p text:style-name="Standard">Vor jedem neuen Kapitel soll gesplittet werden.</text:p> </office:body> </office:document-content> *********************************************************** desired result: *********************************************************** The same document structure, but splitted file 1 has as it's content <text:h text:style-name="Heading 1" text:level="1">Chapter 1</text:h> <text:p text:style-name="Standard">This is my content.</text:p> whereas splitted file 2 has as it's content <text:h text:style-name="Heading 1" text:level="1">Chapter 2</text:h> <text:p text:style-name="Standard">This is my other content.</text:p> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Validating and Viewing XS, David . Pawson | Thread | RE: [xsl] split OpenOffice 1.1 docu, cknell |
RE: [xsl] Another XSL Structure/Tem, Zink, Juergen | Date | [xsl] RE: dictating node processing, Nathan Shaw |
Month |