From: Stefan B. <bo...@ap...> - 2007-01-05 05:52:58
|
On Tue, 2 Jan 2007, James Abley <jam...@gm...> wrote: > On 22/12/06, Stefan Bodewig <bo...@ap...> wrote: >> On Thu, 21 Dec 2006, James Abley <jam...@gm...> wrote: >> >> > I'm writing a patch for consideration that will handle schema >> > validation. >> >> [please use CVS diff to create patches, it is easier to see what >> has changed that way] > > Will do - I'm just TDDing the feature at the moment and wanted to > give a little context. That's fine. Thank you. >> > In developing the tests for this patch though, I seem to have hit >> > a bug, and was hoping someone could help me see what I'm doing >> > wrong. The below tests fail, although I don't think they >> > should. I can't see what properties I should be setting that >> > would cause it to pass. >> >> > private String expected = "<root >> > xmlns='http://www.example.com/xmlns/example'" + " >> > + xmlns:xsi='http://exampe.com/xmlns/not/schema-instance/namespace'/>";; >> > private String actual = "<root xmlns='http://www.example.com/xmlns/example' />"; >> >> Why do you expect them to be different? The >> http://exampe.com/xmlns/not/schema-instance/namespace is never >> used. >> > > Well, because it has the namespace declaration and to my current way > of thinking, that's just an attribute with special semantics. The way XMLUnit treats it it is not an attribute at all. This has a few benefits like allowing to documents to be equal if they use the same namespaces but chose different prefixes for example. If you declare a namespace but never use it, this will never be seen by XMLUnit since (as you've seen) this doesn't affect the DOM tree at all. Do you think this is a problem? > I just realised that the mails on this list don't have the > Reply-To header set to the mailing list, hence the reason I've been > replying to individuals rather than the list. Might it be possible > to alter that? I'll note that setting ot not setting Reply-To headers is the subject of heated discussions (just do a search for "reply-to considered harmful" with your favorite search engine). Fortunately I use a MUA that deals with either way so I'm pretty indifferent. I don't have karma to change that setting, though. Jeff? Cheers Stefan |