Remote XPath queries don't need a local XML document

Are you missing a feature? Request its implementation here.
RogerP
Posts: 17
Joined: Fri May 11, 2007 2:58 pm
Location: Brunel University, UK

Remote XPath queries don't need a local XML document

Post by RogerP »

Hi,

If I want to query a remote resource using the XPath doc() function, I must still open a dummy XML document in <oXygen/> in order to enliven the XPath tools. I would like to suggest that this is an unnecessary restriction.

Also, even more trivial than the above, I am nevertheless curious to know why, when I select "DTD" from the new file wizard, it puts an XML declaration at the top of the new file. Since a DTD isn't XML, the only time this would be useful is in the rare occasions someone might actually want to embed the DTD in their XML but then the file extension wouldn't be ".DTD". I think the behaviour of the "New DTD" wizard is a little overzealous; perhaps it could be persuaded to desist?

Apologies if I have missed how to select/deselect these features.

Just v. minor niggles in an otherwise great product!
adrian
Posts: 2886
Joined: Tue May 17, 2005 4:01 pm

Re: Remote XPath queries don't need a local XML document

Post by adrian »

Hello,

It is disabled mostly because it was designed to execute the expression in the context of the current document. Try to execute an XPath with '.'(dot) and it will return the node at the caret. Also note the XPath update on caret mode button to the right of the combo.
And then there's the XPath 1.0 support which has no doc() function.

I have added this to our issue tracking tool and it will be discussed. But my guess is it will only complicate things in the implementation.

Regarding the XML declaration, it is there to specify the encoding of the file. So there is some purpose in its presence.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply