ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: XML Namespace avoids collision between xml vocabularies was RE: a comment about xml namespace
Date Mon, 29 Dec 2003 14:07:50 GMT
> From: Jim Fuller [] 
> > From: Jose Alberto Fernandez []
> > Sent: 23 December 2003 11:44
> > Subject: RE: a comment about xml namespace
> > about? Given (3) ANT cannot just ignore it, since it may be
> > a typo of some sort. There is not such a thing as an ignorable
> [Jim Fuller] Ant could 'ignore' it if it had a schema or DTD 
> which Ant would use ( perhaps it does, have not plumbed that 
> deep into the code yet)...since Ant does use an xml build 
> file, why not validate it against a schema...ok perhaps the 
> problem here would be keeping up with schema definition with 
> extended tasks...or asking developers to provide one...though 
> XML Schema could simply accommodate for build file specific 
> macrodef, presetdef, antlib, taskdef situations....perhaps I 
> am speaking out of turn and all of this is in the pipeline 
> for future versions.

There is no fix schema for ANT. It all depends on what tasks from which
parties you have. And all this is independent of namespaces.
We have tasks that can look at the buildfile and generate an appropriate
DTD for it, which can then be used to validate it. I am not sure if
it has been updated to manage NS. Maybe we need one task to generate
XMLSchemata but it still will not adress your situation.

> > 2) Alternatively, one could think of using XML 
> processing-instructions
> > to tell ANT that some particular namespace should be ignored by ANT.
> > 
> >   <?ant-ignore uri="...."?>
> >   <rdf:x xmlns:rdf="....">...</rdf:x>
> [Jim Fuller] XML PI's double yuk....why not just define an 
> external xml file which defines how namespaces are 
> processed....I believe that you could use/extend something 
> like James Clark Namespace routing language
> ( as a format 
> for such a document. This would allow you to have a standard 
> definition for Ant processing as general, though gives a nice 
> logical abstraction for extensibility. I would be interested 
> in assisting here, as EXSLT and my other xml bits/bobs are 
> tapering off with XSLT 2.0 approaching. Though perhaps there 
> is a bit of WIKI work would be logical first stop.
Ant external file? Yuk! Wait a minute. 
Why should ANT become a multilingual routing processor
for XML? I think it is a fantastic project but it is not the ANT
I do not see anyone asking XSLT engines to do this kind of thing. 
The XSLT XML processing is for the XSLT, not for doing all for all
XML dialects. Same for ANT.

The only thing here is to allow a way to anotate ANT to give other
XML processors some space. Therefore the point of having a PI.
But we do not need to complicate ANT just for this extreme use case
that you are describing. I think other tools should be developed for

I think you have here a terrific idea for a new project "polyglote"
but that is a different project, not ANT.

> > The different approaches may produce quite different functionality,
> > while in (1) all foreign URIs segregated appart from the 
> rest of the 
> > ANT lingo, on (2) we could actually intermix them freely:
> > 
> >   <?ant-ignore uri="...."?>
> >   <project ... xmlns:rdf="....">
> >     <rdf:x >...</rdf:x>
> >     <target name="xyz" rdf:description="This is my description">
> >       <copy ....>
> >         <rdf:comment>This is a comment inside the code</rdf:comment>
> >         <fileset ..../>
> >       </copy>
> >     </target>
> >   </project>
> > 
> > Which would produce a very powerful intermingling capability, but it
> > may be too powerful (i.e., too confising for the uninitiated).
> [Jim Fuller] having just xml with different namespaces is all 
> you need...and yes xml namespaces can be confusing, which his 
> why you have the default namespace always process in Ant...

Since ANT can use an unlimited number of namespaces, things are not as
I in particular do not like the business of a programming language
(which is
what ANT XML really is) where non-understood things are silently
ignored. (-1)
I think that causes more harm than good. I think stuff that must be
(ant the writer knows about it) must be somehow marked as such (e.g.,
<?ant-ignore ...?>). 

Jose Alberto

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message