You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Wei Yin Teo (JIRA)" <xm...@xml.apache.org> on 2005/05/23 16:09:02 UTC

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

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
    Priority: Minor


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


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

Posted by "Yana Kadiyska (JIRA)" <xm...@xml.apache.org>.
     [ 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


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

Posted by "Cezar Andrei (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-154?page=all ]

Cezar Andrei reassigned XMLBEANS-154:
-------------------------------------

    Assign To: Yana Kadiyska

> 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


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

Posted by "Wei Yin Teo (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-154?page=all ]

Wei Yin Teo updated XMLBEANS-154:
---------------------------------

    Attachment: path.diff

I have fixed it, please see the attached diff.

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