cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henning von Bargen <H.vonBar...@Triestram-Partner.de>
Subject AW: XPath? XPointer? Other? Recommendations needed
Date Fri, 30 Jun 2000 06:50:58 GMT
> -----Urspr√ľngliche Nachricht-----
> Von:	Kirk Woerner [SMTP:kirk@unus.com]
> Gesendet am:	Donnerstag, 29. Juni 2000 20:47
> An:	cocoon-users@xml.apache.org
> Betreff:	XPath? XPointer? Other?  Recommendations needed
> 
> I have a VERY simple data structure that COULD be modelled as one HUGE XML
> file.  I have Areas and Items.  An Area has info associated with it and
then
> sub-areas and/or Items.  So a possible tree could look like
> 
> <Area>
>    <Name>area 1</Name>
>    <Area>
>       <Name>sub area 1</Area>
>    </Area>
>    <Area>
>       <Name>sub area 2</Area>
>       <Item>
>          <Name>Some item</Name>
>       </Item>
>    </Area>
>    <Item>
>       <Name>Item in top Area</Area>
>    </Item>
> </Area>
> 
> Now just because it COULD be done as one XML file, doesn;t mean it should.
> Especially in the use of Cocoon.  I want to make a web site out of this
> hierarchy.  I see 4 possible XSL stylesheets.  One would be for Areas that
> have both sub-areas AND Items, One for Areas with just sub-Areas, one for
> Areas with just items, and one for the Items.  What I don't see is how I
can
> lay it out in the files such that Cocoon does what it needs to do.  If I
> have a SINGLE file, then I have to somehow choose the node to display via
> some parameter maybe passed to XSL.  The fact is though that I don't WANT
to
> have a single file because it will be HUGE.  I'd rather have some sort of
> thing that automatically creates and processes the hierarchy from wherever
> it was accessed and then does the XSL transform from that context.
Ideally,
> each Area/sub-area/item would be in seperate files on the disk and the XSL
> would be able to "see" both the child nodes and the parent node (if any).
> 
> Any ideas on the best way to approach this?  One requirement in my view is
> that no data should have to be repeated. I'd rather not have to have the
> name of an Item repeated in the Area file just so I can create a pretty
> link.  I may actually want more information about an Item than just the
name
> in an Area page...
>
> 
> Any ideas or discussions would be appreciated.  BTW,  I've gotten Cocoon2
up
> and going finally and it's REALLY cool!
> 

If your file would be HUGE, I guess that your data comes from a database?
If so, then you could use the sql taglib to get only the information you
need
from the DB on the fly. A more sophisticated solution could be using Cocoon
with Castor (see .
BTW, I think that Castor looks good but I didnt' manage to get it up and
running
:-(

Henning

Mime
View raw message