https://bz.apache.org/ooo/show_bug.cgi?id=126398

--- Comment #25 from sergiozambrano <[email protected]> ---
Thanks for your advice. I found the output setting and when changing it to HTML
it fixed the self-closing divs.

The export format drop down menu in the export dialog should have separate
options for xml and html though. 

Right now it reads ".xhtml; .html" and that is affecting the biggest user
group: the home user who doesn't know how to deal with the difference.

(The programmer would know what to do to get a strcit xml or would figure it
out faster… and they are the smaller user group (from people who needs to
export to html, because the programmer would rather use another format)

Should I open a new feature request for tha? (separate xhtml and html options
in the exporter window)



It seems the error is already known in bugzilla tracker for other xslt
projects.
It happens in empty elements, as I noticed. 

The solution so far is to put a comment inside the empty element, or a
non-breaking space.

I don't know xml to quickly figure it out, and I still hope the document could
be made the document useful in modern browsers without hacking the exporter
output setting in the application files, so I thought I could save you the
search and copied some solutions I found on the web.



lxml.sax.ElementTreeContentHandler checks closing elements and raises SaxError
on mismatch
lxml.sax.ElementTreeContentHandler supports namespace-less SAX events
(startElement, endElement) and defaults to empty attributes (keyword argument)

Fixed in 2006 "Removing Elements from a tree could make them loose their
namespace declarations" 

That sounds like the this bug (the tag outputting with its default form (not
opening, not closing, empty style by defect)

The recommendation for the cases when the element has no content are
http://www.w3.org/TR/xhtml-media-types/#C_2



If you have declared the xhtml namespace on 
xsl:stylesheet then elements created in the stylesheet will be xhtml 
(unless you work hard to stop that) so perhaps these div elements have 
been copied from an input document?
If the input is in no-namespace and you want to generate elements in the 
xhtml namepsace, you don't want to copy with xsl:copy or xsl:copy-of you 
want to generate an element in the (new) default namespace but wth the 
same local name as before, so don't use
<xsl:copy>
use
<xsl:element name="{local-name()}">

http://www.thecodingforums.com/threads/self-closing-tags.596847/

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to