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 "Chris Simmons (JIRA)" <xe...@xml.apache.org> on 2006/02/15 12:49:11 UTC

[jira] Created: (XERCESJ-1136) Expansion fails for URI's with non-ascii characters.

Expansion fails for URI's with non-ascii characters.
----------------------------------------------------

         Key: XERCESJ-1136
         URL: http://issues.apache.org/jira/browse/XERCESJ-1136
     Project: Xerces2-J
        Type: Bug
  Components: XML Schema API  
    Versions: 2.7.1    
 Environment: Linux, java 1.5
    Reporter: Chris Simmons


The problem appears to be that a valid anyURI that occurs, for example, in a schemaLocation attribute on an import, is not properly escaped.  Any attempt to create a URI from it fails, meaning that if it is relative it is not possible to resolve it against the base system ID.  MalformedURIExceptions generated are swallowed silently, and the end result is a string which is supposed to be the expanded ID which is actually not expanded.  If this string is passed to an XMLEntityResolver, the entity resolver can't deal with it properly.

I think that provided that the hint is a valid anyURI, it should be correctly escaped and the proper expanded system id calculated.

-- 
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-1136) Expansion fails for URIs with non-ascii characters.

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

Michael Glavassevich commented on XERCESJ-1136:
-----------------------------------------------

Xerces has always been strict about what characters are allowed in URIs. RFC 2396 [1] does not allow non-ASCII characters in URIs unless they've been escaped. The developers have never come to a consensus on whether we should tolerate non-ASCII or not, but users are best advised to do the escaping before passing the system ID to Xerces.

Several other JIRA issues have been opened for specific cases:

XERCESJ-391 :: transformer doesn't support Chinese Name Dir
XERCESJ-420 :: Unable to locate DTD if it is in some Chinese Name Dir....
XERCESJ-825 :: Russian folder names not suppotred by SAXParser
XERCESJ-1359 :: DOMParser exception with an xml file which name contains Chinese characters

I'm going to keep this one open as the master since it describes the more general issue and return the others as duplicates.

[1] http://www.ietf.org/rfc/rfc2396.txt

> Expansion fails for URIs with non-ascii characters.
> ---------------------------------------------------
>
>                 Key: XERCESJ-1136
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1136
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.7.1
>         Environment: Linux, java 1.5
>            Reporter: Chris Simmons
>         Attachments: xercesBug.zip
>
>
> The problem appears to be that a valid anyURI that occurs, for example, in a schemaLocation attribute on an import, is not properly escaped.  Any attempt to create a URI from it fails, meaning that if it is relative it is not possible to resolve it against the base system ID.  MalformedURIExceptions generated are swallowed silently, and the end result is a string which is supposed to be the expanded ID which is actually not expanded.  If this string is passed to an XMLEntityResolver, the entity resolver can't deal with it properly.
> I think that provided that the hint is a valid anyURI, it should be correctly escaped and the proper expanded system id calculated.

-- 
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-1136) Expansion fails for URIs with non-ascii characters.

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

Michael Glavassevich updated XERCESJ-1136:
------------------------------------------

    Component/s: SAX
                 JAXP (javax.xml.parsers)
                 DOM (Level 3 Load & Save)

> Expansion fails for URIs with non-ascii characters.
> ---------------------------------------------------
>
>                 Key: XERCESJ-1136
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1136
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (Level 3 Load & Save), JAXP (javax.xml.parsers), SAX, XML Schema API
>    Affects Versions: 2.7.1
>         Environment: Linux, java 1.5
>            Reporter: Chris Simmons
>         Attachments: xercesBug.zip
>
>
> The problem appears to be that a valid anyURI that occurs, for example, in a schemaLocation attribute on an import, is not properly escaped.  Any attempt to create a URI from it fails, meaning that if it is relative it is not possible to resolve it against the base system ID.  MalformedURIExceptions generated are swallowed silently, and the end result is a string which is supposed to be the expanded ID which is actually not expanded.  If this string is passed to an XMLEntityResolver, the entity resolver can't deal with it properly.
> I think that provided that the hint is a valid anyURI, it should be correctly escaped and the proper expanded system id calculated.

-- 
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-1136) Expansion fails for URI's with non-ascii characters.

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

Chris Simmons updated XERCESJ-1136:
-----------------------------------

    Attachment: xercesBug.zip

A minimal program to reproduce the bug.  Requires Xerces in its classpath.

Contains an instance with two imports, both of which require expanding.  The first one (provided for comparison) correctly produces a warning that the file referred to cannot be located. The second one contains a non-ASCII character in its URI which causes it to pass a relative URI into the entity resolver, which then blows up.

> Expansion fails for URI's with non-ascii characters.
> ----------------------------------------------------
>
>          Key: XERCESJ-1136
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1136
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema API
>     Versions: 2.7.1
>  Environment: Linux, java 1.5
>     Reporter: Chris Simmons
>  Attachments: xercesBug.zip
>
> The problem appears to be that a valid anyURI that occurs, for example, in a schemaLocation attribute on an import, is not properly escaped.  Any attempt to create a URI from it fails, meaning that if it is relative it is not possible to resolve it against the base system ID.  MalformedURIExceptions generated are swallowed silently, and the end result is a string which is supposed to be the expanded ID which is actually not expanded.  If this string is passed to an XMLEntityResolver, the entity resolver can't deal with it properly.
> I think that provided that the hint is a valid anyURI, it should be correctly escaped and the proper expanded system id calculated.

-- 
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-1136) Expansion fails for URIs with non-ascii characters.

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

Michael Glavassevich updated XERCESJ-1136:
------------------------------------------

    Summary: Expansion fails for URIs with non-ascii characters.  (was: Expansion fails for URI's with non-ascii characters.)

> Expansion fails for URIs with non-ascii characters.
> ---------------------------------------------------
>
>                 Key: XERCESJ-1136
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1136
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema API
>    Affects Versions: 2.7.1
>         Environment: Linux, java 1.5
>            Reporter: Chris Simmons
>         Attachments: xercesBug.zip
>
>
> The problem appears to be that a valid anyURI that occurs, for example, in a schemaLocation attribute on an import, is not properly escaped.  Any attempt to create a URI from it fails, meaning that if it is relative it is not possible to resolve it against the base system ID.  MalformedURIExceptions generated are swallowed silently, and the end result is a string which is supposed to be the expanded ID which is actually not expanded.  If this string is passed to an XMLEntityResolver, the entity resolver can't deal with it properly.
> I think that provided that the hint is a valid anyURI, it should be correctly escaped and the proper expanded system id calculated.

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