You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2008/06/11 16:10:46 UTC

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

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

Michael Glavassevich resolved XERCESJ-1310.
-------------------------------------------

    Resolution: Invalid

The "element-default" feature works as designed.  It only applies to default values for elements.  Please read the documentation [1] and use the mailing list for asking questions.

[1] http://xerces.apache.org/xerces2-j/features.html#validation.schema.element-default

> setFeature("http://apache.org/xml/features/validation/schema/element-default",false); - not working for attributes
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1310
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1310
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: SAX
>    Affects Versions: 2.9.1
>         Environment: OS : WindowsXP
>            Reporter: Aravind Arasu
>
> 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.

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


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