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 "George Cristian Bina (JIRA)" <xe...@xml.apache.org> on 2006/10/10 15:20:21 UTC

[jira] Created: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

DTD validation on XIncluded documents when the schema language is set to XML Schema
-----------------------------------------------------------------------------------

                 Key: XERCESJ-1202
                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
             Project: Xerces2-J
          Issue Type: Bug
          Components: XInclude 1.0
    Affects Versions: 2.8.1
            Reporter: George Cristian Bina


When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.

foos.xml

<?xml version="1.0" encoding="UTF-8"?>
<foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="foo.xsd"
 xmlns:xi="http://www.w3.org/2001/XInclude">
   <xi:include href="foo.xml"/>
</foos>

foo.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [ ]>
<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="foo.xsd"/>

foo.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="foo"/>
   <xs:element name="foos">
      <xs:complexType>
         <xs:sequence>
            <xs:element ref="foo" maxOccurs="unbounded"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>

Proposed pacth
At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()

        boolean schemaLanguage = false;
        try {
          schemaLanguage = 
            "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
                "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
            ));
        } catch (XMLConfigurationException e) {}
        if (schemaLanguage) {
          fSettings.setFeature(DYNAMIC_VALIDATION, false);
          fSettings.setFeature(VALIDATION, false);
        }

Thanks,
George



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Updated: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=all ]

Michael Glavassevich updated XERCESJ-1202:
------------------------------------------

    Fix Version/s: 2.9.0

> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>             Fix For: 2.9.0
>
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Assigned: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=all ]

Michael Glavassevich reassigned XERCESJ-1202:
---------------------------------------------

    Assignee: Michael Glavassevich

> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Closed: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=all ]

Michael Glavassevich closed XERCESJ-1202.
-----------------------------------------

    Resolution: Fixed

> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>             Fix For: 2.9.0
>
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Closed: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=all ]

Michael Glavassevich closed XERCESJ-1202.
-----------------------------------------


> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Resolved: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=all ]

Michael Glavassevich resolved XERCESJ-1202.
-------------------------------------------

    Resolution: Fixed

George, I've committed a slightly different patch to SVN.  Can you please verify that this works for you now? Thanks.

> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "George Cristian Bina (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=comments#action_12441649 ] 
            
George Cristian Bina commented on XERCESJ-1202:
-----------------------------------------------

Thanks Michael, it works ok now. Regards, George.

> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Reopened: (XERCESJ-1202) DTD validation on XIncluded documents when the schema language is set to XML Schema

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1202?page=all ]

Michael Glavassevich reopened XERCESJ-1202:
-------------------------------------------

             

> DTD validation on XIncluded documents when the schema language is set to XML Schema
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1202
>                 URL: http://issues.apache.org/jira/browse/XERCESJ-1202
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XInclude 1.0
>    Affects Versions: 2.8.1
>            Reporter: George Cristian Bina
>         Assigned To: Michael Glavassevich
>
> When a validation is performed with the schema language property set to XML Schema the DTDs should not be used for validation. This happens when validating a document but not on the included documents. Below you can find an example to reproduce the problem and a proposed patch.
> foos.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <foos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"
>  xmlns:xi="http://www.w3.org/2001/XInclude">
>    <xi:include href="foo.xml"/>
> </foos>
> foo.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE foo [ ]>
> <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:noNamespaceSchemaLocation="foo.xsd"/>
> foo.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>    <xs:element name="foo"/>
>    <xs:element name="foos">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element ref="foo" maxOccurs="unbounded"/>
>          </xs:sequence>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> Proposed pacth
> At the end of the reset method in XIncludeHandler we should check if the schema language property is set to XML Schema and disable the validation and dynamic validation features for the XIncluded documents as we perform the validation only on the main document with the XInclude resolved. One possible implementation of the above is to add the following lines at the end of XIncludeHandler.reset()
>         boolean schemaLanguage = false;
>         try {
>           schemaLanguage = 
>             "http://www.w3.org/2001/XMLSchema".equals(componentManager.getProperty(
>                 "http://java.sun.com/xml/jaxp/properties/schemaLanguage"
>             ));
>         } catch (XMLConfigurationException e) {}
>         if (schemaLanguage) {
>           fSettings.setFeature(DYNAMIC_VALIDATION, false);
>           fSettings.setFeature(VALIDATION, false);
>         }
> Thanks,
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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