Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1310

setFeature("http://apache.org/xml/features/validation/schema/element-default",false); - not working for attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 2.9.1
    • None
    • SAX
    • None
    • OS : WindowsXP

    Description

      Hi,

      I have a requirement where i need to parse a XML files and validate the file against schema.

      But the default value(from schema) for an attribute (Say @attri) is obtained during the parsing.
      I tried suppressing the default value by setting the feature as below.

      parserConfig.setFeature("http://apache.org/xml/features/validation/schema/element-default",false);

      but went in vain .

      I analyzed the latest Xerces sourcecode which was available in your website. I found that this feature is not applied for attributes.

      the other features set related to the schema validation are

      //enable schema validation
      parserConfig.setFeature("http://apache.org/xml/features/validation/schema",true);
      parserConfig.setFeature("http://xml.org/sax/features/validation",true);

      Kindly guide me accordingly.

      Thanks and Regards
      Aravind.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aravicamp Aravind Arasu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: