You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Yana Kadiyska (JIRA)" <xm...@xml.apache.org> on 2005/12/09 22:36:14 UTC

[jira] Resolved: (XMLBEANS-154) selectPath throws exception when concat is used with element containing '&'

     [ http://issues.apache.org/jira/browse/XMLBEANS-154?page=all ]
     
Yana Kadiyska resolved XMLBEANS-154:
------------------------------------

    Resolution: Fixed

At revision 355606.

> selectPath throws exception when concat  is used with element containing '&'
> ----------------------------------------------------------------------------
>
>          Key: XMLBEANS-154
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-154
>      Project: XMLBeans
>         Type: Bug
>     Reporter: Wei Yin Teo
>     Assignee: Yana Kadiyska
>     Priority: Minor
>  Attachments: path.diff
>
> I have tried to use the following xpath
>   "concat('Issues ', issue/issueDescription)"
> for the xml:
>   <issue>
>     <issueDescription>Important & Urgent Issue </issueDescription>
>   </issue>
> It ends with exception:
> java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 3): ' '
> 	at org.apache.xmlbeans.impl.newstore2.Path$SaxonPathImpl$SaxonPathEngine.next(Path.java:424)
> 	at org.apache.xmlbeans.impl.newstore2.Cursor._toSelection(Cursor.java:889)
> 	at org.apache.xmlbeans.impl.newstore2.Cursor._toNextSelection(Cursor.java:878)
> 	at org.apache.xmlbeans.impl.newstore2.Cursor.toNextSelection(Cursor.java:2624)
> 	at org.apache.xmlbeans.impl.newstore2.Cursor._hasNextSelection(Cursor.java:870)
> 	at org.apache.xmlbeans.impl.newstore2.Cursor.hasNextSelection(Cursor.java:2606)
> 	at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:429)
> 	at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:411)
> On the other hand, if there is no '&' in the 'issueDescription', then it is fine.
> This is due to the following line in src/store/org/apache/xmlbeans/impl/store/Path.java
>                             pos = l.load("<xml-fragment>"
>                             + value + "</xml-fragment>").tempCur();
>                             SchemaType type = getType(node);
> where value = 'Important & Urgent Issue ' which is not a valid xml content.

-- 
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org