ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: Ant 1.6 and namespace
Date Mon, 17 Nov 2003 19:31:19 GMT
Dominique Devienne wrote:
>>From: Christopher Lenz [mailto:cmlenz@gmx.de]
>>Dominique Devienne wrote:
>>>>From: peter reilly [mailto:peter.reilly@corvil.com]
>>>>>On Monday 17 November 2003 17:01, Dominique Devienne wrote:
>>>>>So the NS for <project> and <target> does not matter?
>>>>>Conceptually they are part of the Ant XML dialect to me,
>>>>>so seeing them in no namespace at all seems weird??? --DD
>>>>
>>>>If no namespace uri is picked for the empty prefix, it is up
>>>>to the processor to pick one, in ant's case this is
>>>>antlib:org.apache.tools.ant.
>>>
>>>Ah, thanks for the precision. I didn't know this rule.
>>>
>>>Slightly related, if I extracted or wrote a schema for Ant,
>>>and specified an xsi:schemaLocation attribute in <project>,
>>>will Ant ignore the attribute, or barf?
>>
>>If you also define the namespace prefix "xsi", the document is still
>>well-formed so everything should be fine. Xerces will not try to validate
>>the build file though, since Ant doesn't put the parser in validating
>>mode, of course.
> 
> Granted. But Peter apparently says that even though the document is
> well-formed (declared proper xsi NS prefix), Ant might still refuse it...

Right, I forgot that Ant currently ignores the namespaces of attributes.
;-)

> I'm not sure whether it's a valid behavior as far as pure XML processing is
> concerned. xsi:schemaLocation is just one example, there are other XML
> technologies which use namespace'd XML attributes, like XInclude, XLink,
> etc... Ant not supporting any of these might be problematic!?!? --DD

I agree. Attributes in a semantically unknown namespace should be 
ignored. Actually, I think only attributes in the same namespace as the 
element should be considered, i.e. those with no namespace prefix.

Hmm, not sure whether the magic "ant-type" attribute should be in the 
Ant core namespace, but it probably should...

-- 
Christopher Lenz
/=/ cmlenz at gmx.de


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message