ORA-XQ-116-Q: when is }} a single token and when is it two tokens?

SECTION 3.7.1: direct element constructors

Consider the following example:

<a>{attribute b {1}}</a>

Question: is this acceptable syntax, or is it an error because
the }} is interpreted as a literal for right curly brace?
If it is not acceptable, then it would be helpful to say that
if the user has an expression requiring two successive }s, then the
user should put whitespace between them.  If it is acceptable,
then you should qualify that }} is interpreted as a literal for
a right curly brace unless used in a context where two successive
right curly braces would be acceptable.

According to the tables in A.2.2, }} is only recognized in state
ELEMENT_CONTENT.  I simuled the rules in these tables on the 
example above and found that it is in state OPERATOR when the }} 
is encountered.  The OPERATOR state recognizes } but not }}.  
My tentative conclusion is that the example is valid and }} can be used to close two expressions, and not always as a literal for right curly brace.
This appears to be the user-friendly answer, but I worry that 
users will find it hard to know when }} is a literal for a 
right curly brace and when it is two closing curly braces.

One solution would be to do away with }} as a literal for 
curly brace.  Instead, you might define a character reference.

- Steve B.

Received on Monday, 16 February 2004 16:08:16 UTC