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 "Ashitkin Alexander (JIRA)" <xe...@xml.apache.org> on 2009/08/13 10:17:14 UTC

[jira] Created: (XERCESJ-1392) Xerces breakes schema grammar with hints from instance xsi:schemaLocation

Xerces breakes schema grammar with hints from instance xsi:schemaLocation
-------------------------------------------------------------------------

                 Key: XERCESJ-1392
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1392
             Project: Xerces2-J
          Issue Type: Bug
          Components: JAXP (javax.xml.validation)
    Affects Versions: 2.9.1
         Environment: Windows XP 2003
            Reporter: Ashitkin Alexander


Xerces trying to resolve xs:import in schema using relative paths from xsi:schemaLocation hint. Thus, validation fails with a "Failed to read schema document" message.

-- 
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


[jira] Commented: (XERCESJ-1392) Xerces breakes schema grammar with hints from instance xsi:schemaLocation

Posted by "Ashitkin Alexander (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786504#action_12786504 ] 

Ashitkin Alexander commented on XERCESJ-1392:
---------------------------------------------

Hi Michael, thanks for your response. I don't quite sure i've understood you correctly. If points 1 and 2 are questions, then answers are:
1) i suppose the point 1 is regarding the error.xml instance. I don't see any reason to use schemaLocation specified on the xs:import. From my point of view xs:import is an incapsulated part of the schema and i only should provide valid schemaLocations either by external-schemaLocation property, either by xsi:schemaLocation hint. I hope you agree the  xsi:schemaLocation in error.xml is absolutely valid and enough for validation. If you suppose i need to use schemaLocation specified on the xs:import, please explain this.
2) from my point of view point is inside - out, should be :  "Using the URI specified in the instance as a schemaLocation in the xs:import" i think with behaviour is just wrong. if i have a set of schemas under thesame namespace whish resolves relatively, it will break everything.

> Xerces breakes schema grammar with hints from instance xsi:schemaLocation
> -------------------------------------------------------------------------
>
>                 Key: XERCESJ-1392
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1392
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.9.1
>         Environment: Windows XP 2003
>            Reporter: Ashitkin Alexander
>         Attachments: XercesBug.zip
>
>
> Xerces trying to resolve xs:import in schema using relative paths from xsi:schemaLocation hint. Thus, validation fails with a "Failed to read schema document" message.

-- 
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


[jira] Commented: (XERCESJ-1392) Xerces breakes schema grammar with hints from instance xsi:schemaLocation

Posted by "Ashitkin Alexander (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742764#action_12742764 ] 

Ashitkin Alexander commented on XERCESJ-1392:
---------------------------------------------

validation with pure jaxp gives the same result.

> Xerces breakes schema grammar with hints from instance xsi:schemaLocation
> -------------------------------------------------------------------------
>
>                 Key: XERCESJ-1392
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1392
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.9.1
>         Environment: Windows XP 2003
>            Reporter: Ashitkin Alexander
>         Attachments: XercesBug.zip
>
>
> Xerces trying to resolve xs:import in schema using relative paths from xsi:schemaLocation hint. Thus, validation fails with a "Failed to read schema document" message.

-- 
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


[jira] Issue Comment Edited: (XERCESJ-1392) Xerces breakes schema grammar with hints from instance xsi:schemaLocation

Posted by "Ashitkin Alexander (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786504#action_12786504 ] 

Ashitkin Alexander edited comment on XERCESJ-1392 at 12/6/09 11:02 AM:
-----------------------------------------------------------------------

Hi Michael, thanks for your response. I don't quite sure i've understood you correctly. If points 1 and 2 are questions, then answers are:
1) i suppose the point 1 is regarding the error.xml instance. I don't see any reason to use schemaLocation specified on the xs:import. From my point of view xs:import is an incapsulated part of the schema and i only should provide valid schemaLocations either by external-schemaLocation property, either by xsi:schemaLocation hint. I hope you agree the  xsi:schemaLocation in error.xml is absolutely valid and enough for validation. If you suppose i need to use schemaLocation specified on the xs:import, please explain this.
2) i think the point is inside - out, should be :  "Using the URI specified in the instance as a schemaLocation in the xs:import" and if i understood right, this behaviour is just wrong. if i have a set of schemas under the same namespace whose linked relatively, this behaviour will break everything. In a case of honour-all-schemalocations this behaviour even more questionable.

      was (Author: ashitkin.alexander):
    Hi Michael, thanks for your response. I don't quite sure i've understood you correctly. If points 1 and 2 are questions, then answers are:
1) i suppose the point 1 is regarding the error.xml instance. I don't see any reason to use schemaLocation specified on the xs:import. From my point of view xs:import is an incapsulated part of the schema and i only should provide valid schemaLocations either by external-schemaLocation property, either by xsi:schemaLocation hint. I hope you agree the  xsi:schemaLocation in error.xml is absolutely valid and enough for validation. If you suppose i need to use schemaLocation specified on the xs:import, please explain this.
2) from my point of view point is inside - out, should be :  "Using the URI specified in the instance as a schemaLocation in the xs:import" i think with behaviour is just wrong. if i have a set of schemas under thesame namespace whish resolves relatively, it will break everything.
  
> Xerces breakes schema grammar with hints from instance xsi:schemaLocation
> -------------------------------------------------------------------------
>
>                 Key: XERCESJ-1392
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1392
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.9.1
>         Environment: Windows XP 2003
>            Reporter: Ashitkin Alexander
>         Attachments: XercesBug.zip
>
>
> Xerces trying to resolve xs:import in schema using relative paths from xsi:schemaLocation hint. Thus, validation fails with a "Failed to read schema document" message.

-- 
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


[jira] Updated: (XERCESJ-1392) Xerces breakes schema grammar with hints from instance xsi:schemaLocation

Posted by "Ashitkin Alexander (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashitkin Alexander updated XERCESJ-1392:
----------------------------------------

    Attachment: XercesBug.zip

project to reproduce. error xml validation fails with error.

> Xerces breakes schema grammar with hints from instance xsi:schemaLocation
> -------------------------------------------------------------------------
>
>                 Key: XERCESJ-1392
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1392
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.9.1
>         Environment: Windows XP 2003
>            Reporter: Ashitkin Alexander
>         Attachments: XercesBug.zip
>
>
> Xerces trying to resolve xs:import in schema using relative paths from xsi:schemaLocation hint. Thus, validation fails with a "Failed to read schema document" message.

-- 
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


[jira] Commented: (XERCESJ-1392) Xerces breakes schema grammar with hints from instance xsi:schemaLocation

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784620#action_12784620 ] 

Michael Glavassevich commented on XERCESJ-1392:
-----------------------------------------------

A couple issues here:
1) Why we're using xsi:schemaLocation instead of the schemaLocation specified on the xs:import.
2) Using the base URI from the importing schema document for resolving the URI specified in the instance.

I believe the 1st is at the discretion of the schema processor. The spec gives implementations freedom on how they locate schema documents. The schemaLocation on an import is just a hint. Changing this now might break users who rely on the current behaviour from Xerces.

The 2nd is clearly wrong. Should use the base URI from the instance for resolving URIs contained within it.


> Xerces breakes schema grammar with hints from instance xsi:schemaLocation
> -------------------------------------------------------------------------
>
>                 Key: XERCESJ-1392
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1392
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.9.1
>         Environment: Windows XP 2003
>            Reporter: Ashitkin Alexander
>         Attachments: XercesBug.zip
>
>
> Xerces trying to resolve xs:import in schema using relative paths from xsi:schemaLocation hint. Thus, validation fails with a "Failed to read schema document" message.

-- 
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