You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Filip S. Adamsen (JIRA)" <ji...@apache.org> on 2009/02/09 14:18:59 UTC

[jira] Commented: (TAP5-171) Filter out attributes with default value (from DTD) when parsing templates

    [ https://issues.apache.org/jira/browse/TAP5-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671846#action_12671846 ] 

Filip S. Adamsen commented on TAP5-171:
---------------------------------------

It would be nice if this could be added. With enough links on a page it's actually quite a bit of useless markup...

> Filter out attributes with default value (from DTD) when parsing templates
> --------------------------------------------------------------------------
>
>                 Key: TAP5-171
>                 URL: https://issues.apache.org/jira/browse/TAP5-171
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.18
>         Environment: Sun JDK 1.5
>            Reporter: Folke Behrens
>            Priority: Minor
>         Attachments: attributes2-dtd-default.patch, Test.html
>
>
> Consider testing for org.xml.sax.ext.Attributes2 and use Attributes2.isSpecified(int) to check if the attribute is really specified or just a default declaration.
> With this you can e.g. test if <a  shape="rect" > is really set. Test for "http://xml.org/sax/features/use-attributes2" or just use "instanceof":
> if (attributes instanceof Attributes2) {
>     if (( (Attributes2)attributes ).isSpecified(i)) {
>         // do something
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.