ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: XMLFragment
Date Thu, 27 Nov 2003 14:09:11 GMT
Christopher Lenz wrote:
> Stefan Bodewig wrote:
>> On 27 Nov 2003, Stefan Bodewig <bodewig@apache.org> wrote:
>>> On Thu, 27 Nov 2003, Christopher Lenz <cmlenz@gmx.de> wrote:
>>>> So the namespace URI and the local name are currently actually
>>>> passed to the DynamicConfigurator in the form
>>>> namespace-uri:local-name?
>>>
>>> Actually, I thought so from reading the code,
>>
>> And they in fact are, at least under some circumstances.
> 
> IMHO, this is a really bad thing. If I take any 1.5-based task that uses 
> DynamicConfigurator, and define it into a namespace, it will break, 
> because the code doesn't split the namespace URI and the local name.
> 
> Only the local name should be passed to DynamicConfigurator.
> 
> Naturally, that will make stuff like XMLFragment less useful in 1.6, 
> because no information about namespaces will be available. To support 
> such use cases, a new DynamicConfiguratorNS interface should be added 
> that would support methods like createDynamicElement(namespaceUri, 
> localName) and createDynamicAttribute(namespaceUri, localName, value).

The interface should also have a method like setNamespaceContext(..) to pass 
in an object that knows all the prefix-to-URI mappings (something like 
org.xml.sax.helpers.NamespaceSupport, but immutable).

-chris


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


Mime
View raw message