|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: JAXP's ID Transform failing to include namespace declarati
> 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"?> > <svg/> > > 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 different. 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 transformation. Mike Kay
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








