Return-Path: X-Original-To: apmail-xalan-dev-archive@www.apache.org Delivered-To: apmail-xalan-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE2E3ED25 for ; Thu, 28 Feb 2013 23:57:15 +0000 (UTC) Received: (qmail 18486 invoked by uid 500); 28 Feb 2013 23:57:15 -0000 Delivered-To: apmail-xalan-dev-archive@xalan.apache.org Received: (qmail 18424 invoked by uid 500); 28 Feb 2013 23:57:15 -0000 Mailing-List: contact dev-help@xalan.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@xalan.apache.org Delivered-To: mailing list dev@xalan.apache.org Received: (qmail 18416 invoked by uid 99); 28 Feb 2013 23:57:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2013 23:57:15 +0000 Date: Thu, 28 Feb 2013 23:57:15 +0000 (UTC) From: "Steven J. Hathaway (JIRA)" To: dev@xalan.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (XALANJ-2566) OutputFormat option for XMLSerializer for empty element rendering (self closing tag rendering) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/XALANJ-2566?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Steven J. Hathaway reassigned XALANJ-2566: ------------------------------------------ Assignee: (was: Steven J. Hathaway) =20 > OutputFormat option for XMLSerializer for empty element rendering (self c= losing 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 problem= s in Xalan projects. Anybody can view the issue.)=20 > Components: Serialization > Reporter: Andrej Zavr=C5=A1nik > Labels: features > > Additional option needed for XMLSerializer provided with OutputFormat to = render empty tags as > self closing: and other not: > 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 =3D 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)) > { > =09_printer.printText("/>"); > } > else > { > =09_printer.printText("> =09_printer.printText(elem.getTagName()); > =09_printer.printText(">"); > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs 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