cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirk Woerner" <k...@unus.com>
Subject XPath? XPointer? Other? Recommendations needed
Date Thu, 29 Jun 2000 18:47:15 GMT
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!


Mime
View raw message