[oXygen-user] Using XQuery Update Modifies Whole Document

George Bina
Wed Sep 17 09:20:24 CDT 2014


Hi Eliot,

AFAIK XSLT will have the same problem, it will not preserve the DOCTYPE 
declaration and it has no way to tell that an attribute was actually 
specified in the document or its value comes from the DTD/schema. There 
are some ways to workaround these but none is elegant.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 17/09/14 17:10, Eliot Kimber wrote:
> I suspect this is a limitation or unavoidable consequence of how XQuery
> update works, or at least how Saxon does things, but I wanted to check.
>
> If I have a DTD-based document, e.g., a DITA map or topic, and apply an
> XQuery update to it using Saxon EE, I noticed that the entire document is
> updated such that the DOCTYPE declaration is removed and all defaulted
> attributes are now explicit in the instance, which is obviously not to be
> desired.
>
> Is there any way to avoid this behavior?
>
> My alternative is to use XSLT of course but I was trying to use XQuery
> update as being more convenient for certain types of enhancements to
> existing documents, namely adding attributes to existing elements.
>
> Thanks,
>
> Eliot
> —————
> Eliot Kimber, Owner
> Contrext, LLC
> http://contrext.com
>
>
>
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list