ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <knut.wannhe...@paranor.ch>
Subject RE: xml namespace support in ant2
Date Fri, 06 Sep 2002 09:21:51 GMT
> > 
> > XML namespaces certainly wouldn't be a prerequisite for a 
> grammar, but it
> > would certainly make it easier.
> > 
> > [1] Namespaces in XML http://www.w3.org/TR/REC-xml-names/
> 
> Good, now I understand :-D
> 
> You are right, if we make tasks use a namespace, they can also supply 
> the schema for themselves, and be validated by XML parsing instead of 
> inside themselves!
> 

Maybe you could also bind a namespace to a library of tasks and types
instead of to individual tasks.  Then you could use the library descriptor
(as in antlib) to specify the schema (if one is available).

> This is really very very cool, I want it in embed proposal :-)
> 
> Any practical implementative suggestions?
> 

I suppose that's where it gets interesting and probably difficult at the
same time.  Difficult because you can't just validate the whole buildfile
because it's only stated in the buildfile itself what external libraries are
used!  So either you would first have to assemble a schema for the whole
document from the separate schema fragments, or you would have to validate
the different tasks and types against the corresponding schema fragment
individually.

Other than that you still have to decide on a schema language to use.  I
would argue that RELAX NG would be the most suitable for this kind of stuff.
But I'm not an expert on this, so maybe someone will disagree.

For Ant's elements, tasks, and types it shouldn't be too hard to put
together a schema.  And I think that would already be of great value.  But
having a reserved XML namespace for the Ant elements would almost be a
requirement.

I have already written a couple of RELAX NG grammars for my own purposes,
but they're by no means complete.

Cheers,

--
knut

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message