Some people have been suggesting using a subset of XQuery
syntax, others have been saying it would be better to use XML
syntax.
It occurs to me one might achieve both objectives at the same
time by using a subset of XSLT syntax. That is, we could define the syntax to be
a named xsl:template instruction containing a sequence constructor in which only
the following are permitted:
(a) An <xsl:sequence> instruction whose select attribute
contains a constructor function with a string literal argument, for example
<xsl:sequence select="xs:positiveInteger('5')"/>
(b) An empty <xsl:attribute>, <xsl:value-of>,
<xsl:comment>, <xsl:processing-instruction> or <xsl:namespace>
instruction whose content is constrained to use no non-literal expressions or
AVTs.
(c) An <xsl:element> or <xsl:document> instruction
whose content is constrained to hold only <xsl:element>,
<xsl:attribute>, <xsl:value-of>, <xsl:comment>,
<xsl:processing-instruction> or <xsl:namespace> instructions that
themselves follow the same rules.
There might be a need to define some additional attributes
specific to the serialization format, e.g. to represent
IDness.
Regards,
|