Forum OpenACS Q&A: Commenting xql files?

Collapse
Posted by Randy O'Meara on
I've looked around the source somewhat and don't see an example of comments contained in a .xql file. Is it possible to place comments in .xql files? How?
Collapse
2: Re: Commenting xql files? (response to 1)
Posted by Roberto Mello on
You could put comments in the SQL of a query with regular SQL comments: -- This is a comment.

But as far as an XML comment tag, I don't know of one.

-Roberto

Collapse
3: Re: Commenting xql files? (response to 1)
Posted by Dirk Gomez on
I agree that we need comments in the XQL files, but please not in the SQL clause.
Collapse
4: Re: Commenting xql files? (response to 2)
Posted by Bruno Mattarollo on

Hello Roberto,

If the XQL file is valid XML 1.0, the comment could use the valid tag.

Just my 2 cents

/B

Collapse
5: Re: Commenting xql files? (response to 1)
Posted by Andrei Popov on
It works with tDOM, as long as you do not put a comment within a <querytext> tag.
Collapse
6: Re: Commenting xql files? (response to 1)
Posted by Randy O'Meara on
Good info. I had tried this type of comment outside any "queryset" element, both before and after "xml version" element and the system complained:

  Error: OH OH, error, first node is comment and not 'queryset'

and refused to load the xql file. I didn't take it further before I posted this question.

However, after reading the resonses, I delved a little deeper. And, as Andrei and Bruno indicate above, the standard comment mechanism does work within the "queryset" element but ouside of the "querytext" element.

Is there an emacs expert (Bart?) that can tell me how to make these xml comments stand out in font-lock? I'm using the emacs settings defined by Bart in This article.

BTW, this applies to the 4.6 CVS tip of a coupel weeks ago and AOLserver with nsxml (not checked with tDom), if that makes any difference.