[ http://issues.apache.org/jira/browse/TUSCANY-663?page=all ]

ant elder updated TUSCANY-663:
------------------------------

    Fix Version/s: Cpp-current

> XPATH doesnt support dots in names (treats them as indices)
> -----------------------------------------------------------
>
>                 Key: TUSCANY-663
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-663
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>            Reporter: Ed Slattery
>             Fix For: Cpp-current
>
>
> The XPATH subset from the specification uses NCname for names, so in theory 
> "www.xxx.yyy.zzz is a vaild name, which may either be a field called 
> "www.xxx.yyy.zzz" or a many  valued 
> field called "www.xxx.yyy" at offset "zzz"
> The C++ implementation restricts this and assumes all [] or "." are indices. 
> Fix this by parsing the XPATH token, then checking if the token is a valid 
> property name for the object, then
> if not, looking for the last "." or "[" to see if theres an index.
> Heres the details of the grammar...
> path ::= (scheme ':')? '/'? (step '/')* step
> scheme ::= [^:]
> step ::= '@'? property
>       | property '[' index_from_1 ']'
>       | property '.' index_from_0
>       | reference '[' attribute '=' value ']'
>       | ".."
> property ::= NCName      ;; may be simple or complex type
> attribute ::= NCName     ;; must be simple type
> reference :: NCName      ;; must be DataObject type
> index_from_0 ::= Digits
> index_from_1 ::= NotZero (Digits)?
> value ::= Literal                     
>       | Number
>       | Boolean
> Literal ::= '"' [^"]* '"'
>       | "'" [^']* "'"
> Number ::= Digits ('.' Digits?)? 
>       | '.' Digits
> Boolean ::= true
>       | false
> NotZero ::= [1-9]
> Digits ::= [0-9]+
> ;; leading '/' begins at the root
> ;; ".." is the containing DataObject, using containment properties

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to