You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Libbrecht <pa...@ags.uni-sb.de> on 2003/09/04 10:53:00 UTC
How to output a element within maven.xml
Hi,
I am currently making a bunch of JNLP output within a maven.xml and...
maven complains that the jar element needs a jar-file to be specified...
Well... I tried putting everything in the no-namespace world, but that
doesn't help either...
My current solution is to use <xml:element> but it's definitely
unelegant... Is there a way hidden way to have a no-namespace element
being output without it being considered as a tag to execute ?
For example, I think that if the maven.xml included a namespace
declaration of the jeez, ant, or jelly tag-libs, then the
default-namespace approach (which maps anything in the
no-namespace-world to the jeez taglib) should be dropped.
Does it make sense ?
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to output a element within maven.xml
Posted by Paul Libbrecht <pa...@activemath.org>.
Good point if indeed the ant plugin does this but I feel it should not
as it is not a problem in jelly, the blank-namespace (note, this is
different than the default-namespace) is not pre-registred as it is in
Maven.
Actually I'm still not clear about the ant tag-library role in there...
for it to be actually registering this renaming feature of the dummy
namespace, it needs to do at least something like another
tag-library... (and that namesapce should start with "jelly:" for it to
be a tag-library).
So I presume it's a feature of the maven parsing interface (which is
definitely a type of filter for these things).
Maybe another approach would be to say that the "jelly:jeez" namespace
is preregistred with blank prefix even if it does not stand in the XML
file... this way I could still be using <jar xmlns="">.
But xml-editors (e.g. offering XPath) could get lost... not really a
trouble for maven.xml I think.
Paul
On Lundi, sept 8, 2003, at 13:22 Europe/Paris, dion@multitask.com.au
wrote:
> Shouldn't this go in the Jelly docs, as it's not a feature of Maven per
> se.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
> Paul Libbrecht <pa...@activemath.org> wrote on 08/09/2003 09:05:21 PM:
>
>> Cool, that's exactly what I was missing.
>>
>> Please then add something like follows on the user-guide.xml,
>> say at the end of the section on "the project element":
>> <p>Users experienced with jelly will recognize however that this would
>> limit the capabilities to output elements in the no-namespace world
>> (e.g. when outputting an XML file). For this the ant plugin registers
>> the namespace "dummy" so that anything in this namespace is re-output
>> to
>
>> the no-namespace world. This allows, for example, the following:
>> <code><![CDATA[<j:file name="Output.xml"><jar
>> href="xxx"/></j:file>]]></code>
>>
>> Hope that helps.
>>
>> Paul
>>
>>
>>
>> dion@multitask.com.au wrote:
>>> Huh??
>>>
>>> The ant plugin does this ok.....
>>>
>>> using xmlns="dummy"
>>> --
>>> dIon Gillard, Multitask Consulting
>>> Blog: http://blogs.codehaus.org/people/dion/
>>>
>>>
>>> Paul Libbrecht <pa...@activemath.org> wrote on 08/09/2003 08:13:16 AM:
>>>
>>>
>>>> The problem:
>>>>
>>>> I want to generate a jnlp manifest, they have no namespace and have
>>>> children called "property" and "jar".
>>>>
>>>> However, the no-namespace "property" and "jar" elements are defined
>>>> in
>
>>>> all maven.xml and included scripts... namely they are attached to
> their
>>>> associated ant tasks.
>>>> And the problem is general: there is no-way to output an element
>>>> that
>>>> has no-namespace and the name of an existing tag without the use of
>>>> <xml:element> (which is very verbose).
>>>>
>>>> One approach would be to say that if the jeez taglib-namespace is
>>>> defined as part of the namespaces, then the default-namespace should
> not
>>>
>>>
>>>> be mapped to jeez taglib.
>>>> This might break a lot of things.
>>>>
>>>> A more delicate approach would be to have an element that disables
> this
>>>> mapping for all its children. Unless the jeez to no-namespace
>>>> binding
> is
>>>
>>>
>>>> well isolated, this can be very hard.
>>>> It would be the most elegant way.
>>>> I could then use
>>>> <disableNoNamespaceJeez>
>>>> <jnlp> <resources><jar href="blop.jar/></resources></jnlp>
>>>> </disableNoNamespaceJeez>
>>>> And still have jeez available on no-namespace everywhere.
>>>> (such an element could also be written with the first
>>>> ns-declaration-based approach)
>>>>
>>>> Finally, a hack I just found could be to have a namespace-changing
>>>> tag-library. Its tags would output the same tags but with a
>>>> different
>>>> namespace.
>>>>
>>>> Comments welcome.
>>>>
>>>> Paul
>>>>
>>>>
>>>> dion@multitask.com.au wrote:
>>>>
>>>>> post us a sample....
>>>>> --
>>>>> dIon Gillard, Multitask Consulting
>>>>> Blog: http://blogs.codehaus.org/people/dion/
>>>>>
>>>>>
>>>>> Paul Libbrecht <pa...@ags.uni-sb.de> wrote on 04/09/2003 06:53:00
>>>>> PM:
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am currently making a bunch of JNLP output within a maven.xml
> and...
>>>
>>>
>>>>>> maven complains that the jar element needs a jar-file to be
>>>
>>> specified...
>>>
>>>>>> Well... I tried putting everything in the no-namespace world, but
> that
>>>
>>>
>>>>>> doesn't help either...
>>>>>>
>>>>>> My current solution is to use <xml:element> but it's definitely
>>>>>> unelegant... Is there a way hidden way to have a no-namespace
> element
>>>>>> being output without it being considered as a tag to execute ?
>>>>>>
>>>>>> For example, I think that if the maven.xml included a namespace
>>>>>> declaration of the jeez, ant, or jelly tag-libs, then the
>>>>>> default-namespace approach (which maps anything in the
>>>>>> no-namespace-world to the jeez taglib) should be dropped.
>>>>>>
>>>>>> Does it make sense ?
>>>>>>
>>>>>> Paul
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to output a element within maven.xml
Posted by di...@multitask.com.au.
Shouldn't this go in the Jelly docs, as it's not a feature of Maven per
se.
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Paul Libbrecht <pa...@activemath.org> wrote on 08/09/2003 09:05:21 PM:
> Cool, that's exactly what I was missing.
>
> Please then add something like follows on the user-guide.xml,
> say at the end of the section on "the project element":
> <p>Users experienced with jelly will recognize however that this would
> limit the capabilities to output elements in the no-namespace world
> (e.g. when outputting an XML file). For this the ant plugin registers
> the namespace "dummy" so that anything in this namespace is re-output to
> the no-namespace world. This allows, for example, the following:
> <code><![CDATA[<j:file name="Output.xml"><jar
> href="xxx"/></j:file>]]></code>
>
> Hope that helps.
>
> Paul
>
>
>
> dion@multitask.com.au wrote:
> > Huh??
> >
> > The ant plugin does this ok.....
> >
> > using xmlns="dummy"
> > --
> > dIon Gillard, Multitask Consulting
> > Blog: http://blogs.codehaus.org/people/dion/
> >
> >
> > Paul Libbrecht <pa...@activemath.org> wrote on 08/09/2003 08:13:16 AM:
> >
> >
> >>The problem:
> >>
> >>I want to generate a jnlp manifest, they have no namespace and have
> >>children called "property" and "jar".
> >>
> >>However, the no-namespace "property" and "jar" elements are defined in
> >>all maven.xml and included scripts... namely they are attached to
their
> >>associated ant tasks.
> >>And the problem is general: there is no-way to output an element that
> >>has no-namespace and the name of an existing tag without the use of
> >><xml:element> (which is very verbose).
> >>
> >>One approach would be to say that if the jeez taglib-namespace is
> >>defined as part of the namespaces, then the default-namespace should
not
> >
> >
> >>be mapped to jeez taglib.
> >>This might break a lot of things.
> >>
> >>A more delicate approach would be to have an element that disables
this
> >>mapping for all its children. Unless the jeez to no-namespace binding
is
> >
> >
> >> well isolated, this can be very hard.
> >>It would be the most elegant way.
> >>I could then use
> >> <disableNoNamespaceJeez>
> >> <jnlp> <resources><jar href="blop.jar/></resources></jnlp>
> >> </disableNoNamespaceJeez>
> >>And still have jeez available on no-namespace everywhere.
> >>(such an element could also be written with the first
> >>ns-declaration-based approach)
> >>
> >>Finally, a hack I just found could be to have a namespace-changing
> >>tag-library. Its tags would output the same tags but with a different
> >>namespace.
> >>
> >>Comments welcome.
> >>
> >>Paul
> >>
> >>
> >>dion@multitask.com.au wrote:
> >>
> >>>post us a sample....
> >>>--
> >>>dIon Gillard, Multitask Consulting
> >>>Blog: http://blogs.codehaus.org/people/dion/
> >>>
> >>>
> >>>Paul Libbrecht <pa...@ags.uni-sb.de> wrote on 04/09/2003 06:53:00 PM:
> >>>
> >>>
> >>>
> >>>>Hi,
> >>>>
> >>>>I am currently making a bunch of JNLP output within a maven.xml
and...
> >
> >
> >>>>maven complains that the jar element needs a jar-file to be
> >
> > specified...
> >
> >>>>Well... I tried putting everything in the no-namespace world, but
that
> >
> >
> >>>>doesn't help either...
> >>>>
> >>>>My current solution is to use <xml:element> but it's definitely
> >>>>unelegant... Is there a way hidden way to have a no-namespace
element
> >>>>being output without it being considered as a tag to execute ?
> >>>>
> >>>>For example, I think that if the maven.xml included a namespace
> >>>>declaration of the jeez, ant, or jelly tag-libs, then the
> >>>>default-namespace approach (which maps anything in the
> >>>>no-namespace-world to the jeez taglib) should be dropped.
> >>>>
> >>>>Does it make sense ?
> >>>>
> >>>>Paul
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to output a element within maven.xml
Posted by Paul Libbrecht <pa...@activemath.org>.
Cool, that's exactly what I was missing.
Please then add something like follows on the user-guide.xml,
say at the end of the section on "the project element":
<p>Users experienced with jelly will recognize however that this would
limit the capabilities to output elements in the no-namespace world
(e.g. when outputting an XML file). For this the ant plugin registers
the namespace "dummy" so that anything in this namespace is re-output to
the no-namespace world. This allows, for example, the following:
<code><![CDATA[<j:file name="Output.xml"><jar
href="xxx"/></j:file>]]></code>
Hope that helps.
Paul
dion@multitask.com.au wrote:
> Huh??
>
> The ant plugin does this ok.....
>
> using xmlns="dummy"
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
> Paul Libbrecht <pa...@activemath.org> wrote on 08/09/2003 08:13:16 AM:
>
>
>>The problem:
>>
>>I want to generate a jnlp manifest, they have no namespace and have
>>children called "property" and "jar".
>>
>>However, the no-namespace "property" and "jar" elements are defined in
>>all maven.xml and included scripts... namely they are attached to their
>>associated ant tasks.
>>And the problem is general: there is no-way to output an element that
>>has no-namespace and the name of an existing tag without the use of
>><xml:element> (which is very verbose).
>>
>>One approach would be to say that if the jeez taglib-namespace is
>>defined as part of the namespaces, then the default-namespace should not
>
>
>>be mapped to jeez taglib.
>>This might break a lot of things.
>>
>>A more delicate approach would be to have an element that disables this
>>mapping for all its children. Unless the jeez to no-namespace binding is
>
>
>> well isolated, this can be very hard.
>>It would be the most elegant way.
>>I could then use
>> <disableNoNamespaceJeez>
>> <jnlp> <resources><jar href="blop.jar/></resources></jnlp>
>> </disableNoNamespaceJeez>
>>And still have jeez available on no-namespace everywhere.
>>(such an element could also be written with the first
>>ns-declaration-based approach)
>>
>>Finally, a hack I just found could be to have a namespace-changing
>>tag-library. Its tags would output the same tags but with a different
>>namespace.
>>
>>Comments welcome.
>>
>>Paul
>>
>>
>>dion@multitask.com.au wrote:
>>
>>>post us a sample....
>>>--
>>>dIon Gillard, Multitask Consulting
>>>Blog: http://blogs.codehaus.org/people/dion/
>>>
>>>
>>>Paul Libbrecht <pa...@ags.uni-sb.de> wrote on 04/09/2003 06:53:00 PM:
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>I am currently making a bunch of JNLP output within a maven.xml and...
>
>
>>>>maven complains that the jar element needs a jar-file to be
>
> specified...
>
>>>>Well... I tried putting everything in the no-namespace world, but that
>
>
>>>>doesn't help either...
>>>>
>>>>My current solution is to use <xml:element> but it's definitely
>>>>unelegant... Is there a way hidden way to have a no-namespace element
>>>>being output without it being considered as a tag to execute ?
>>>>
>>>>For example, I think that if the maven.xml included a namespace
>>>>declaration of the jeez, ant, or jelly tag-libs, then the
>>>>default-namespace approach (which maps anything in the
>>>>no-namespace-world to the jeez taglib) should be dropped.
>>>>
>>>>Does it make sense ?
>>>>
>>>>Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to output a element within maven.xml
Posted by di...@multitask.com.au.
Huh??
The ant plugin does this ok.....
using xmlns="dummy"
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Paul Libbrecht <pa...@activemath.org> wrote on 08/09/2003 08:13:16 AM:
> The problem:
>
> I want to generate a jnlp manifest, they have no namespace and have
> children called "property" and "jar".
>
> However, the no-namespace "property" and "jar" elements are defined in
> all maven.xml and included scripts... namely they are attached to their
> associated ant tasks.
> And the problem is general: there is no-way to output an element that
> has no-namespace and the name of an existing tag without the use of
> <xml:element> (which is very verbose).
>
> One approach would be to say that if the jeez taglib-namespace is
> defined as part of the namespaces, then the default-namespace should not
> be mapped to jeez taglib.
> This might break a lot of things.
>
> A more delicate approach would be to have an element that disables this
> mapping for all its children. Unless the jeez to no-namespace binding is
> well isolated, this can be very hard.
> It would be the most elegant way.
> I could then use
> <disableNoNamespaceJeez>
> <jnlp> <resources><jar href="blop.jar/></resources></jnlp>
> </disableNoNamespaceJeez>
> And still have jeez available on no-namespace everywhere.
> (such an element could also be written with the first
> ns-declaration-based approach)
>
> Finally, a hack I just found could be to have a namespace-changing
> tag-library. Its tags would output the same tags but with a different
> namespace.
>
> Comments welcome.
>
> Paul
>
>
> dion@multitask.com.au wrote:
> > post us a sample....
> > --
> > dIon Gillard, Multitask Consulting
> > Blog: http://blogs.codehaus.org/people/dion/
> >
> >
> > Paul Libbrecht <pa...@ags.uni-sb.de> wrote on 04/09/2003 06:53:00 PM:
> >
> >
> >>Hi,
> >>
> >>I am currently making a bunch of JNLP output within a maven.xml and...
> >>maven complains that the jar element needs a jar-file to be
specified...
> >>
> >>Well... I tried putting everything in the no-namespace world, but that
> >>doesn't help either...
> >>
> >>My current solution is to use <xml:element> but it's definitely
> >>unelegant... Is there a way hidden way to have a no-namespace element
> >>being output without it being considered as a tag to execute ?
> >>
> >>For example, I think that if the maven.xml included a namespace
> >>declaration of the jeez, ant, or jelly tag-libs, then the
> >>default-namespace approach (which maps anything in the
> >>no-namespace-world to the jeez taglib) should be dropped.
> >>
> >>Does it make sense ?
> >>
> >>Paul
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to output a element within maven.xml
Posted by Paul Libbrecht <pa...@activemath.org>.
The problem:
I want to generate a jnlp manifest, they have no namespace and have
children called "property" and "jar".
However, the no-namespace "property" and "jar" elements are defined in
all maven.xml and included scripts... namely they are attached to their
associated ant tasks.
And the problem is general: there is no-way to output an element that
has no-namespace and the name of an existing tag without the use of
<xml:element> (which is very verbose).
One approach would be to say that if the jeez taglib-namespace is
defined as part of the namespaces, then the default-namespace should not
be mapped to jeez taglib.
This might break a lot of things.
A more delicate approach would be to have an element that disables this
mapping for all its children. Unless the jeez to no-namespace binding is
well isolated, this can be very hard.
It would be the most elegant way.
I could then use
<disableNoNamespaceJeez>
<jnlp> <resources><jar href="blop.jar/></resources></jnlp>
</disableNoNamespaceJeez>
And still have jeez available on no-namespace everywhere.
(such an element could also be written with the first
ns-declaration-based approach)
Finally, a hack I just found could be to have a namespace-changing
tag-library. Its tags would output the same tags but with a different
namespace.
Comments welcome.
Paul
dion@multitask.com.au wrote:
> post us a sample....
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
> Paul Libbrecht <pa...@ags.uni-sb.de> wrote on 04/09/2003 06:53:00 PM:
>
>
>>Hi,
>>
>>I am currently making a bunch of JNLP output within a maven.xml and...
>>maven complains that the jar element needs a jar-file to be specified...
>>
>>Well... I tried putting everything in the no-namespace world, but that
>>doesn't help either...
>>
>>My current solution is to use <xml:element> but it's definitely
>>unelegant... Is there a way hidden way to have a no-namespace element
>>being output without it being considered as a tag to execute ?
>>
>>For example, I think that if the maven.xml included a namespace
>>declaration of the jeez, ant, or jelly tag-libs, then the
>>default-namespace approach (which maps anything in the
>>no-namespace-world to the jeez taglib) should be dropped.
>>
>>Does it make sense ?
>>
>>Paul
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to output a element within maven.xml
Posted by di...@multitask.com.au.
post us a sample....
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Paul Libbrecht <pa...@ags.uni-sb.de> wrote on 04/09/2003 06:53:00 PM:
>
> Hi,
>
> I am currently making a bunch of JNLP output within a maven.xml and...
> maven complains that the jar element needs a jar-file to be specified...
>
> Well... I tried putting everything in the no-namespace world, but that
> doesn't help either...
>
> My current solution is to use <xml:element> but it's definitely
> unelegant... Is there a way hidden way to have a no-namespace element
> being output without it being considered as a tag to execute ?
>
> For example, I think that if the maven.xml included a namespace
> declaration of the jeez, ant, or jelly tag-libs, then the
> default-namespace approach (which maps anything in the
> no-namespace-world to the jeez taglib) should be dropped.
>
> Does it make sense ?
>
> Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org