Apache OpenOffice (AOO) Bugzilla – Issue 87731
Export an XForm/Form as XHTML contains no content
Last modified: 2013-03-11 15:01:20 UTC
If you create a form/XForm in the writer & then chose File/Export and then choose the file format of xhtml the output file looks like this: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title /><meta name="generator" content="StarOffice/OpenOffice.org XSLT (http://xml.openoffice.org/sx2ml)" /><meta name="author" content="Adam Flinton" /><meta name="created" content="2008-04-01T11:30:20" /><meta name="changedby" content="Adam Flinton" /><meta name="changed" content="2008-04-01T14:29:56" /><base href="." /><style type="text/css"> @page { size: 20.999cm 29.699cm; margin-top: 2cm; margin-bottom: 2cm; margin-left: 2cm; margin-right: 2cm } table { border-collapse:collapse; border-spacing:0; empty-cells:show } td, th { vertical-align:top; } h1, h2, h3, h4, h5, h6 { clear:both } ol, ul { padding:0; } * { margin:0; } *.gr1 { font-size:12pt; border-width:solidcm; border-style:; border-color:; } *.gr2 { font-size:12pt; } *.Caption { font-family:'Times New Roman'; font-size:12pt; margin-top:0.212cm; margin-bottom:0.212cm; font-style:italic; } *.Heading { font-family:Arial; font-size:14pt; margin-top:0.423cm; margin-bottom:0.212cm; } *.Index { font-family:'Times New Roman'; font-size:12pt; } *.List { font-family:'Times New Roman'; font-size:12pt; margin-top:0cm; margin-bottom:0.212cm; } *.ListContents { font-family:'Times New Roman'; font-size:12pt; margin-left:1cm; margin-right:0cm; text-indent:0cm; } *.P1 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; font-style:normal; } *.P2 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; } *.P3 { font-family:'Times New Roman'; font-size:12pt; text-align:left ! important; } *.Standard { font-family:'Times New Roman'; font-size:12pt; } *.Textbody { font-family:'Times New Roman'; font-size:12pt; margin-top:0cm; margin-bottom:0.212cm; } *.EndnoteSymbol { } *.FootnoteSymbol { } *.Internetlink { color:#000080; text-decoration:underline; } *.VisitedInternetLink { color:#800000; text-decoration:underline; } </style></head><body dir="ltr"><p class="P2" /></body></html> i.e. absolutely no content.
Created attachment 52458 [details] Example ODT containing a form
Reassigned to JSI.
Accepted, also in OOO300m5
change components
sub category: external filters
first portion of XForms magic - enjoy <!-- XForms --> <xsl:template match="office:forms[xforms:*]"> <xsl:apply-templates/> </xsl:template> <xsl:template match="xforms:*"> <xsl:copy-of select="."/> </xsl:template> <xsl:template match="form:form"/> <xsl:template match="form:text | form:formatted-text | form:checkbox"> <xforms:input bind="{@xforms:bind}"> <xsl:apply-templates select="//form:fixed-text[@form:for eq current()/@form:id]" mode="forms-label"/> </xforms:input> </xsl:template> <xsl:template match="form:fixed-text" mode="forms-label"> <xforms:label> <xsl:value-of select="@form:label"/> </xforms:label> </xsl:template> <xsl:template match="form:radio[@xforms:bind]"> <xforms:select1 bind="{@xforms:bind}" appearance="full"> <xsl:apply-templates select="../form:radio[@form:name eq current()/@form:name]" mode="radio-values"/> </xforms:select1> </xsl:template> <xsl:template match="form:radio" mode="radio-values"> <xforms:item> <xforms:value><xsl:value-of select="@form:label"/></xforms:value> <xforms:label><xsl:value-of select="@form:label"/></xforms:label> </xforms:item> </xsl:template> <xsl:template match="form:button[@form:button-type='submit' ]"> <xforms:submit submission="{@form:xforms-submission}"> <xforms:label><xsl:value-of select="@form:label"/></xforms:label> </xforms:submit> </xsl:template> <xsl:template match="draw:g[draw:control]"> <xsl:apply-templates/> </xsl:template> <xsl:template match="draw:control"> <!-- possibly better to use index here, but form usually not so huge --> <xsl:apply-templates select="//form:*[@form:id eq current()/@draw:control][1]"></xsl:apply-templates> </xsl:template> <xsl:template match="form:frame"> <xforms:group> <xsl:apply-templates/> </xforms:group> </xsl:template> <xsl:template match="form:combobox"> <xforms:select1 bind="{@xforms:bind}" appearance="minimal"> <xsl:apply-templates/> </xforms:select1> </xsl:template> <xsl:template match="form:item"> <xforms:item> <xforms:value><xsl:value-of select="@form:label"/></xforms:value> <xforms:label><xsl:value-of select="@form:label"/></xforms:label> </xforms:item> </xsl:template> <xsl:template match="form:listbox"> <xforms:select1 bind="{@xforms:bind}"> <xforms:itemset bind="{@form:xforms-list-source}"> <xforms:label ref="."/> <xforms:value ref="."/> </xforms:itemset> </xforms:select1> </xsl:template>
Created attachment 56547 [details] test sample used
Created attachment 56548 [details] result of export
can`t add attachment with mimetype application/xhtml+xml just got answer - "You must select a legal mime type. 'application/xhtml+xml' is not a legal mime type." should i add bug for bugzilla? :) by the way - i used for testing X-Smiles browser while XForms plugin for Firefox 3.0 are broken (but at least in X-Smiles all work as expected)
*** Issue 47549 has been marked as a duplicate of this issue. ***
Adapt issue type to PATCH and target to OOo 3.0.1. Add issue to CWS xsltfilter11 and going to review this issue soon.. Kind regards, Svante
I am sorry. I have to postpone this, due to my work on the ODF 1.2 format and the ODF toolkit. PS: What MIME Type shall we use for the XHTML? We are currently using XHTML 1.1 with mathml, but there is AFAIK no XHTML with mathml & xforms..
mathml already supported by current filter... just not every document contain equation(s)... IMHO: the best solution - implement some kind of "dynamic doctype" but this is out of XSLT scope i hope find some time to adapt my path for ODF 1.2 filter in near future
As my daughter was born three days earlier than expected, I have to postpone this CWS to the next OOo release. I will be in a parental absence till mid of March. Sorry for the delay. Svante
As there are no more parental absence months for me, I am pretty confident the patch will make it to the OOo 3.3. Sorry for the delay! Svante
OOo 3.3 is nearly final. I change the target of this issue to OOo 3.x. Please find a solution and set a correct target, if you know when a fix can be integrated.
I'm adding this comment to all open issues with Issue Type == PATCH. We have 220 such issues, many of them quite old. I apologize for that. We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0. If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know. On the other hand, if the patch is no longer relevant, please let us know that as well. If you have any general questions or want to discuss this further, please send a note to our dev mailing list: dev@openoffice.apache.org Thanks! -Rob