xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven J. Hathaway (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (XALANJ-2566) OutputFormat option for XMLSerializer for empty element rendering (self closing tag rendering)
Date Thu, 28 Feb 2013 23:57:15 GMT

     [ https://issues.apache.org/jira/browse/XALANJ-2566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Steven J. Hathaway reassigned XALANJ-2566:

    Assignee:     (was: Steven J. Hathaway)
> OutputFormat option for XMLSerializer for empty element rendering (self closing tag rendering)
> ----------------------------------------------------------------------------------------------
>                 Key: XALANJ-2566
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2566
>             Project: XalanJ2
>          Issue Type: Improvement
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.
 Anybody can view the issue.) 
>          Components: Serialization
>            Reporter: Andrej Završnik
>              Labels: features
> Additional option needed for XMLSerializer provided with OutputFormat to render empty
tags as
> self closing: <tag /> and other not:<other></other>
> Some self closing tags are not allowed in HTML5, so they must be rendered differently.
> Currently this is not possible with XMLSerializer.
> List of desired self closing tags could be provided as string list:
> OutputFormat format = new OutputFormat(...);
> format.selfClosingTags(new String[]{"one", "two", "three"});
> In the protected void serializeElement(Element elem) method the empty tag rendering could
be extended to check how to render empty tags:
> // customization of closing elements rendering for HTML5
> if (isSelfClosingElement(elem))
> {
> 	_printer.printText("/>");
> }
> else
> {
> 	_printer.printText("></");
> 	_printer.printText(elem.getTagName());
> 	_printer.printText(">");
> }

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org

View raw message