Hello all.
In tamino Demo zone, you can see, under the heading “Simple XQuery” tha they do a complete doctype instance insert using XQuery and I imagine the suggested syntax:
-------------------------------------------
update
let $doc := document {
<doctype_root_element>
…
</doctype_root_element>
}
do insert tf:newDocument($doc)
-------------------------------------------
Now this all sounds nice and dandy, but it’s not supported. I really don’t understand what is the sentance on Tamino DemoZone (XQuery) supposed to mean: This is only a workaround to load documents. Currently this function is not implemented into Tamino.
This means they’re working on it?
Is there or isn’t there therefore a way to insert new doctype instances into Tamino using XQuery? I didn’t find any. Inserting elements is fine.
Right now I must use an API to do it, (such as the ASP.NET API), but I much rather do it through XQuery - this allows me to keep the same code.
If anyone can clarify this situation, I would be grateful.
Thank you.
Peter Endisch
Hello Peter,
no, Tamino XQuery does currently not allow document insert, and, yes, we are working on this.
The current XQuery draft (02 May 2003) defines a computed document constructor, but this does not exactly meet our requirements w.r.t. the set of parameters requested and validation (among others).
We would like some additional constructor parms most likely implementation-specific as ino:id. And we certainly require validation when inserting a new document. We are currently designing this in parallel to discussing the issue with our W3C XQuery WG members.
Having said that your query did it right according to the draft.
Regards,
Juliane.