summaryrefslogtreecommitdiff
path: root/source/text/shared/guide/xsltfilter_create.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'source/text/shared/guide/xsltfilter_create.xhp')
-rw-r--r--source/text/shared/guide/xsltfilter_create.xhp162
1 files changed, 162 insertions, 0 deletions
diff --git a/source/text/shared/guide/xsltfilter_create.xhp b/source/text/shared/guide/xsltfilter_create.xhp
new file mode 100644
index 0000000000..de469f24b8
--- /dev/null
+++ b/source/text/shared/guide/xsltfilter_create.xhp
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+
+<!--
+ ***********************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************
+ -->
+
+
+ <helpdocument version="1.0">
+<meta>
+<topic id="textsharedguidexsltfilter_createxhp" indexer="include" status="PUBLISH">
+<title xml-lang="en-US" id="tit">Creating XML Filters </title>
+<filename>/text/shared/guide/xsltfilter_create.xhp</filename>
+</topic>
+</meta>
+<body>
+
+
+
+<bookmark xml-lang="en-US" branch="index" id="bm_id7007583"><bookmark_value>testing XML filters</bookmark_value>
+<bookmark_value>XML filters;creating/testing</bookmark_value>
+</bookmark>
+ <comment>mw moved 2 index entries from xsltfilter.xhp, then changed "XML filters;"</comment>
+ <paragraph xml-lang="en-US" id="hd_id1413922" role="heading" level="1" l10n="NEW"><variable id="xsltfilter"><link href="text/shared/guide/xsltfilter_create.xhp">Creating XML Filters</link>
+</variable></paragraph>
+ <paragraph xml-lang="en-US" id="par_idN1053D" role="heading" level="2" l10n="NEW">Creating an XML Filter for %PRODUCTNAME</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN109A9" role="paragraph" l10n="NEW">When you create an XML filter for %PRODUCTNAME, you need to design an <emph>XSLT stylesheet</emph> that can convert to and from the OpenDocument XML file format.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN109B0" role="tip" l10n="NEW">For more information about the OpenDocument XML format, go to <link href="http://xml.openoffice.org/">http://xml.openoffice.org/</link>.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN109C5" role="paragraph" l10n="NEW">If you want, you can include a <emph>template</emph> with your filter to apply %PRODUCTNAME styles to an XML document that you import.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN109CC" role="paragraph" l10n="CHG">You can also include the <emph>Document Type Definition</emph> (DTD) for the external XML format so you can validate the XML format, for example, when you test the filter.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10531" role="heading" level="2" l10n="NEW">To Create an XML Filter</paragraph>
+ <list type="ordered">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN109E0" role="paragraph" l10n="NEW">Create an XSLT transformation <emph>stylesheet</emph> that maps the elements of the external XML format to the elements of the OpenDocument XML file format and back again.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN109E8" role="paragraph" l10n="NEW">Create a template that assigns %PRODUCTNAME styles to elements in the external XML format when you import a file in this format into %PRODUCTNAME.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN109EC" role="paragraph" l10n="NEW">In %PRODUCTNAME Writer, create a text document, and choose <item type="menuitem">Tools - XML Filter Settings</item>.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN109F4" role="paragraph" l10n="NEW">Click <emph>New</emph>.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN109FC" role="paragraph" l10n="NEW">In the <emph>XML Filter</emph> dialog, click the <emph>General</emph> tab, and define the properties of the filter.</paragraph>
+ </listitem>
+ </list>
+ <list type="unordered">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A03" role="paragraph" l10n="NEW">In the <emph>Filter Name</emph> box, enter a name for the XML filter.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10CA1" role="paragraph" l10n="NEW">This name is displayed in the <emph>XML Filter Settings</emph> dialog.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A09" role="paragraph" l10n="NEW">In the <emph>Application</emph> box, select the %PRODUCTNAME application that the filter is for.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A0F" role="paragraph" l10n="NEW">In the <emph>Name of File Type</emph> box, enter the file type that the filter is for.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10CC6" role="paragraph" l10n="NEW">This name is displayed in the list of file types in the <emph>Open</emph>, <emph>Export</emph>, and <emph>Save As</emph> dialogs.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A15" role="paragraph" l10n="NEW">In the <emph>File extension</emph> box, enter the extension for the exported file.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10A1B" role="note" l10n="NEW">To differentiate the file from other XML files, enter an extension other than *.xml.</paragraph>
+ </listitem>
+ </list>
+ <list type="ordered" startwith="6">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A1F" role="paragraph" l10n="NEW">On the <emph>Transformation</emph> tab page, define the transformation properties for the filter.</paragraph>
+ </listitem>
+ </list>
+ <list type="unordered">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A26" role="paragraph" l10n="NEW">(Optional) In the <emph>DocType</emph> box, enter the document type identifier for the external file format.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10D0E" role="paragraph" l10n="NEW">This identifier is used to detect the file type on import.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A2C" role="paragraph" l10n="NEW">(Optional) In the <emph>DTD</emph> box, enter the path and file name of the DTD for the external file format.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10D1F" role="paragraph" l10n="NEW">This DTD is used to validate the files on export.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A32" role="paragraph" l10n="NEW">In the <emph>XSLT for export</emph> box, enter the path and file name of the XSLT stylesheet that defines the transformation from OpenDocument format to the external format.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A38" role="paragraph" l10n="NEW">In the <emph>XSLT for import</emph> box, enter the path and file name to the XSLT stylesheet that defines the transformation from the external format to OpenDocument format.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A3E" role="paragraph" l10n="NEW">(Optional) In the <emph>Template for import</emph> box, enter the path and name of the template that defines the %PRODUCTNAME styles that are used in the imported file.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10A44" role="note" l10n="NEW">The files that are specified on the <emph>Transformation</emph> tab page are copied to the local %PRODUCTNAME users directory.</paragraph>
+ </listitem>
+ </list>
+ <list type="ordered" startwith="7">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A4C" role="paragraph" l10n="NEW">Click <emph>OK</emph>.</paragraph>
+ </listitem>
+ </list>
+ <paragraph xml-lang="en-US" id="par_idN10A56" role="heading" level="2" l10n="NEW">To Test an XML Filter</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10A5A" role="paragraph" l10n="NEW">You can perform basic tests on a custom XML filter in %PRODUCTNAME.</paragraph>
+ <paragraph xml-lang="en-US" id="par_idN10A91" role="note" l10n="NEW">The document is not altered by these tests. </paragraph>
+ <list type="ordered">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A60" role="paragraph" l10n="NEW">Create or open a text document.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A67" role="paragraph" l10n="NEW">Choose <item type="menuitem">Tools - XML Filter Settings</item>.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A6F" role="paragraph" l10n="CHG">In the list of filters, select the filter that you want to test, and click <emph>Test XSLTs</emph>.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A82" role="paragraph" l10n="NEW">To test an <emph>Export</emph> Filter, do one of the following in the <emph>Export</emph> area of the dialog:</paragraph>
+ </listitem>
+ </list>
+ <list type="unordered">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10DEB" role="paragraph" l10n="NEW">Click <emph>Browse</emph>, select the %PRODUCTNAME document that you want to test, and click <emph>Open</emph>.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10DF7" role="paragraph" l10n="NEW">To test the current document, click <emph>Current Document</emph>.</paragraph>
+ </listitem>
+ </list>
+ <list type="ordered" startwith="5">
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10A99" role="paragraph" l10n="NEW">To test an <emph>Import</emph> Filter, click <emph>Browse</emph> in the <emph>Import</emph> area of the dialog, select a document, and click <emph>Open</emph>.</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph xml-lang="en-US" id="par_idN10E32" role="paragraph" l10n="NEW">To validate the transformed file against the specified DTD, click <emph>Validate</emph>.</paragraph>
+ </listitem>
+ </list>
+ <section id="relatedtopics">
+
+ <paragraph xml-lang="en-US" id="par_id8579668" role="paragraph" l10n="NEW"><link href="text/shared/guide/xsltfilter.xhp">About XML Filters</link></paragraph>
+ <paragraph xml-lang="en-US" id="par_id5569017" role="paragraph" l10n="NEW"><link href="text/shared/guide/xsltfilter_distribute.xhp">Distributing XML filters</link></paragraph>
+
+ </section>
+ </body>
+</helpdocument>