XML and subscripts  Error reporting with invalid for xml usage

Release Bulletin Adaptive Server® Enterprise Version 12.5.2 for HP-UX

Treatment of XPath operators, “//” and “/”

In Adaptive Server version 12.5.2, the interpretation of the “//” operator has been changed to reflect the XPath standard.

For example, the following returns the title of each book whose author’s first name is “Mary.”

/bookstore/book[author/first-name = "Mary"]/title

In Adaptive Server 12.5.1, you could also reference the first name using the “//” operator:

/bookstore/book[//first-name = "Mary"]/title

Adaptive Server 12.5.1 interpreted the leading “//” operator as a relative reference to all first-name elements contained in the current book element. The XPath standard, however, specifies that a leading “/” operator is an absolute reference that references every first-name element in the entire document. To reference the first-name elements contained in the current book, you must precede the “//” operator with the “.” operator to indicate the current context:

/bookstore/book[.//first-name = "Mary"]/title

Adaptive Server 12.5.2 adopts the XPath standard interpretation of the “//” operator. Queries using Adaptive Server 12.5.1 that were written in the second example’s form raise an exception error should be rewritten in form of the third example.





Copyright © 2004. Sybase Inc. All rights reserved. Error reporting with invalid for xml usage

View this release bulletin as PDF