You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/05/23 14:42:17 UTC
Idea sought for XInclude within
Hello,
I wanted to include the connection parameters from another file into an
<sql:execute-query> element. But the docs state that it is an error for
this element to contain children of another namespace. So, there's no
way I can include the whole she-bang in one step.
I guess I have to write:
<sql:execute-query>
<sql:dburl><xinclude:include parse="xml"
href="foo.xml#xpointer(//dburl)"/></sql:dburl>
... and so on for all parameters?
Or does anyone have a less verbose idea?
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Idea sought for XInclude within
Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 23 May 2000, Ulrich Mayring wrote:
> Hello,
>
> I wanted to include the connection parameters from another file into an
> <sql:execute-query> element. But the docs state that it is an error for
> this element to contain children of another namespace. So, there's no
> way I can include the whole she-bang in one step.
>
> I guess I have to write:
>
> <sql:execute-query>
> <sql:dburl><xinclude:include parse="xml"
> href="foo.xml#xpointer(//dburl)"/></sql:dburl>
> ... and so on for all parameters?
>
> Or does anyone have a less verbose idea?
yeah. i'd do something like this:
foo.xml:
<defs xmlns:sql="...">
<sql:dburl>jdbc:mysql: ... </sql:dburl>
...
</defs>
page.xml:
<sql:execute-query>
<xinclude:include href="foo.xml#xpointer(/defs/*)"/>
</sql:execute-query>
and put the xinclude processor the xsp processor. by the time the
document gets to the taglib, there will be no extra elements to confuse
the taglib.
- donald