Comments (Was: Re: Namespaces (Was: Re: [Xpath-ng] Thoughts on work products))
Jeni Tennison
jeni at jenitennison.com
Sat Nov 30 03:01:41 MST 2002
David Rosenborg wrote:
>> Unrelated issue: what do we use as comments? // and /**/ seem
>> inappropriate at best :) # is used for fragment IDs, but might be
>> contextually disambiguated. I'm just interested because I wanted to
>> insert a comment above and couldn't.
>
> {-- I could live with the XPath 2.0 syntax --}
>
> -- But I think dropping the braces is even better, simply less clutter --
The problem with using "--"s in XPath NG comments is that when XPath
NG is embedded in XML elements or attributes, it becomes impossible to
"comment out" the relevant section.
e.g. if you have:
<xsl:value-of select="-- some comment here --
..." />
Then you can't do:
<!--
<xsl:value-of select="-- some comment here --
..." />
-->
because then the XML comment contains "--", which isn't allowed.
I'd prefer a syntax for comments that we can embed in XML easily.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
More information about the Xpath-ng
mailing list