Guest w3r Posted September 15, 2010 Share Posted September 15, 2010 I am trying to use openoffice writer to create an xform (to version 1 specification) that will produce an xml file for a database. The writer interface is poor, so what I do is create an empty writer xform document. The writer native file format (odt) is a zip archive of xml files. I use a text editor (jedit, with plug-ins 'archive', 'xml') to open the 'content.xml' file created by writer (see below). The problem is that the output xml file by the submission element. What is the correct syntax to ensure that the output xml file contains the value 'epc england' selected from the list menu.<?xml version="1.0" encoding="UTF-8"?><office:document-contentxmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"xmlns:xlink="http://www.w3.org/1999/xlink"xmlns:dc="http://purl.org/dc/elements/1.1/"xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"xmlns:math="http://www.w3.org/1998/Math/MathML"xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"xmlns:ooo="http://openoffice.org/2004/office"xmlns:ooow="http://openoffice.org/2004/writer"xmlns:oooc="http://openoffice.org/2004/calc"xmlns:dom="http://www.w3.org/2001/xml-events"xmlns:xforms="http://www.w3.org/2002/xforms"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:rpt="http://openoffice.org/2005/report"xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"xmlns:xhtml="http://www.w3.org/1999/xhtml"xmlns:grddl="http://www.w3.org/2003/g/data-view#"xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"office:version="1.2"grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"> <office:scripts/> <office:font-face-decls> <style:font-face style:name="Liberation Serif"svg:font-family="'Liberation Serif'"style:font-family-generic="roman" style:font-pitch="variable"/> <style:font-face style:name="Liberation Sans"svg:font-family="'Liberation Sans'"style:font-family-generic="swiss" style:font-pitch="variable"/> <style:font-face style:name="DejaVu Sans"svg:font-family="'DejaVu Sans'"style:font-family-generic="system" style:font-pitch="variable"/> </office:font-face-decls> <office:automatic-styles> <style:style style:name="P1" style:family="paragraph"> <style:paragraph-properties fo:text-align="start"/> </style:style> <style:style style:name="P2" style:family="paragraph"> <style:paragraph-properties fo:text-align="center"/> </style:style> <style:style style:name="gr1" style:family="graphic"> <style:graphic-properties fo:border="solid #c0c0c0"style:wrap="run-through" style:number-wrapped-paragraphs="no-limit"style:vertical-pos="middle" style:vertical-rel="line"style:horizontal-pos="from-left" style:horizontal-rel="paragraph"draw:wrap-influence-on-position="once-concurrent"style:flow-with-text="false"/> </style:style> <style:style style:name="gr2" style:family="graphic"> <style:graphic-properties style:wrap="run-through"style:number-wrapped-paragraphs="no-limit" style:vertical-pos="middle"style:vertical-rel="line" style:horizontal-pos="from-left"style:horizontal-rel="paragraph"draw:wrap-influence-on-position="once-concurrent"style:flow-with-text="false"/> </style:style> </office:automatic-styles> <office:body> <office:text> <office:forms form:automatic-focus="false" form:apply-design-mode="false"> <xforms:model> <xforms:instance> <purpose> <analysis type="epc">epc england</analysis> <analysis type="epc">epc scotland</analysis> </purpose> </xforms:instance> <xforms:bind id="analysistypes" nodeset="analysis" type="xsd:string"/> <xforms:submission id="savepagegeneralinformation"action="file://~/tmp/testsubmit.xml" method="put"indent="false" omit-xml-declaration="false" standalone="false" ref="analysis"/> <xsd:schema/> </xforms:model> <form:form form:name="Standard" form:apply-filter="true"form:command-type="table"form:control-implementation="ooo:com.sun.star.form.component.Form"office:target-frame="" xlink:href=""> <form:listbox form:name="List Box 1"form:control-implementation="ooo:com.sun.star.form.component.ListBox"form:id="control1" form:dropdown="true" form:size="20"form:bound-column="1" xforms:bind="analysistypes"form:xforms-list-source="analysistypes"> <form:properties> <form:property form:property-name="DefaultControl"office:value-type="string"office:string-value="com.sun.star.form.control.ListBox"/> <form:list-property form:property-name="DefaultSelection"office:value-type="float"/> </form:properties> </form:listbox> <form:button form:name="save page button"form:control-implementation="ooo:com.sun.star.form.component.CommandButton"form:id="control2" form:label="save this page"form:button-type="submit" office:target-frame="" xlink:href=""form:image-data="" form:xforms-submission="savepagegeneralinformation"form:delay-for-repeat="PT0.50S" form:image-position="center"> <form:properties> <form:property form:property-name="DefaultControl"office:value-type="string"office:string-value="com.sun.star.form.control.CommandButton"/> </form:properties> </form:button> </form:form> </office:forms> <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:p text:style-name="Standard">General information</text:p> <text:p text:style-name="Standard"/> <text:p text:style-name="Standard">Purpose of analysis:<draw:control text:anchor-type="as-char" draw:z-index="0"draw:style-name="gr1" draw:text-style-name="P1" svg:width="4.543cm"svg:height="0.809cm" draw:control="control1"/> </text:p> <text:p text:style-name="Standard"/> <text:p text:style-name="Standard"> <draw:control text:anchor-type="as-char" draw:z-index="1"draw:style-name="gr2" draw:text-style-name="P2" svg:width="3.497cm"svg:height="0.809cm" draw:control="control2"/> </text:p> </office:text> </office:body></office:document-content> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.