Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-171

Filter out attributes with default value (from DTD) when parsing templates

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Abandoned
    • 5.2, 5.0.18
    • None
    • tapestry-core
    • Sun JDK 1.5

    Description

      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)

      { // do something }

      }

      Attachments

        1. attributes2-dtd-default.patch
          1.0 kB
          Folke Behrens
        2. Test.html
          0.3 kB
          Folke Behrens
        3. TAP5-171 5.2.4.patch
          3 kB
          Martin Strand

        Activity

          People

            Unassigned Unassigned
            messi Folke Behrens
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: