You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Markus Wagner <ma...@mail.uni-mainz.de> on 2000/11/29 23:56:10 UTC
xml site organization: how to make it growable?
Hi,
I have defined a web site with one menu and a lot of pages as follows:
<web name="MyWeb">
<menu>
<group name="About me">
<item id="1" name="My Interests"/>
<item id="2" name="My Bookmarks"/>
</group>
<group name="...">
...
</group>
</menu>
<page id="1" name="My Interests">
...content...
</page>
<page id="2" name="My Bookmarks">
...content...
</page>
</web>
Assume this code in a file called "myweb.xml".
I then use parameters to select the actual page to be displayed, e. g.
http://localhost/myweb.xml?id=2
Within my xsl stylesheet I use this parameter to select one page from
the set of defined pages:
<xsl:apply-templates select="page[@id=$id]"/>
This all works fine, but when I have many pages, the organization gets
inefficient. I do not want to keep all page elements in one file. So I
have to declare them as external entities at the beginning and I have to
reference them within the web element.
Isn't it possible to include an external xml file with one single
statement, textually?
Or:
How can I minimize my work when adding or changing my pages?
Many thanks,
Markus
Re: xml site organization: how to make it growable?
Posted by Markus Wagner <ma...@mail.uni-mainz.de>.
Hi Viktor,
the main problem would, howto get the external documents into my web?
<web>
<menu>
...
</menu>
The documents should go here!!!
</web>
The only thin I know is to use the ENTITY-tag. But this would force me
to make everything twice: declare an external file at the top of
MyWeb.xml, and reference it within the web (&myBookmargs; etc...).
Markus
Viktors Rotanovs wrote:
>
> Hi Markus,
>
> just curious: any reason to refer everything
> as myweb.xml instead of MyInterests.xml, MyBookmarks.xml
> and so on referring to single XSL stylesheet?
>
> On Thursday 30 November 2000 00:56, you wrote:
> > Hi,
> >
> > I have defined a web site with one menu and a lot of pages as follows:
> >
> > <web name="MyWeb">
> >
> > <menu>
> > <group name="About me">
> > <item id="1" name="My Interests"/>
> > <item id="2" name="My Bookmarks"/>
> > </group>
> > <group name="...">
> > ...
> > </group>
> > </menu>
> >
> > <page id="1" name="My Interests">
> > ...content...
> > </page>
> >
> > <page id="2" name="My Bookmarks">
> > ...content...
> > </page>
> >
> > </web>
> >
> > Assume this code in a file called "myweb.xml".
> >
> > I then use parameters to select the actual page to be displayed, e. g.
> > http://localhost/myweb.xml?id=2
> >
> > Within my xsl stylesheet I use this parameter to select one page from
> > the set of defined pages:
> >
> > <xsl:apply-templates select="page[@id=$id]"/>
> >
> > This all works fine, but when I have many pages, the organization gets
> > inefficient. I do not want to keep all page elements in one file. So I
> > have to declare them as external entities at the beginning and I have to
> > reference them within the web element.
> >
> > Isn't it possible to include an external xml file with one single
> > statement, textually?
> >
> > Or:
> >
> > How can I minimize my work when adding or changing my pages?
> >
> > Many thanks,
> >
> > Markus
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> --
> Best Wishes,
> Viktors Rotanovs
> http://riga.nu/ - XML websites, Riga, Latvia. Phone/Fax +371 7377-472
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: xml site organization: how to make it growable?
Posted by Viktors Rotanovs <Vi...@Rotanovs.com>.
Hi Markus,
just curious: any reason to refer everything
as myweb.xml instead of MyInterests.xml, MyBookmarks.xml
and so on referring to single XSL stylesheet?
On Thursday 30 November 2000 00:56, you wrote:
> Hi,
>
> I have defined a web site with one menu and a lot of pages as follows:
>
> <web name="MyWeb">
>
> <menu>
> <group name="About me">
> <item id="1" name="My Interests"/>
> <item id="2" name="My Bookmarks"/>
> </group>
> <group name="...">
> ...
> </group>
> </menu>
>
> <page id="1" name="My Interests">
> ...content...
> </page>
>
> <page id="2" name="My Bookmarks">
> ...content...
> </page>
>
> </web>
>
> Assume this code in a file called "myweb.xml".
>
> I then use parameters to select the actual page to be displayed, e. g.
> http://localhost/myweb.xml?id=2
>
> Within my xsl stylesheet I use this parameter to select one page from
> the set of defined pages:
>
> <xsl:apply-templates select="page[@id=$id]"/>
>
> This all works fine, but when I have many pages, the organization gets
> inefficient. I do not want to keep all page elements in one file. So I
> have to declare them as external entities at the beginning and I have to
> reference them within the web element.
>
> Isn't it possible to include an external xml file with one single
> statement, textually?
>
> Or:
>
> How can I minimize my work when adding or changing my pages?
>
> Many thanks,
>
> Markus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
--
Best Wishes,
Viktors Rotanovs
http://riga.nu/ - XML websites, Riga, Latvia. Phone/Fax +371 7377-472