Lists Home |
Date Index |
> I've hit an unclear spot in the JAXP specification regarding the
> behavior of ID transforms. I think one thing should be happening and
> I know something else is happening but I'm not absolutely clear on
> whether or not I'm right. Clarification would be appreciated.
I agree with you that the spec isn't clear!
> However, what this in fact produces is
> <?xml version="1.0" encoding="UTF-8"?>
> There are two problems here:
> 1. The namespace is lost on the svg element.
> 2. The DOCTYPE declaration is lost.
I certainly wouldn't expect the namespace declaration to be lost. If Saxon
is losing it, it's because the namespace declaration isn't present in the
DOM in the form Saxon expects. There seem to be 57 varieties of ways that
namespaces may or may not be represented in a DOM, and Saxon often has
trouble with DOM input for this reason. I don't think your message actually
said which DOM implementation you were using: in my experience, they are all
I would expect the DOCTYPE declaration to be lost. Saxon is basically doing
an identity transformation according to the XPath data model. If information
isn't present in the XPath data model, then it's lost during an identity