cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Steven Cummings)
Subject RE: URI parts extraction
Date Wed, 20 Nov 2002 17:30:08 GMT

I would suggest writing an XSL Transform that you pass the URI parts to as parameters. You'll
have to generate a dummy document to initiate the transformation.

The template will look something like this:

<!-- Globar params should get values from the sitemap. -->
<xsl:param name="dir1"/>
<xsl:param name="dir2"/>
<xsl:param name="dir3"/>
<xsl:param name="dir4"/>
<xsl:param name="file1"/>
<xsl:template match="/">
    <node> cocoon </node>
    <node> <xsl:value-of select="$dir1"/> </node>
    <node> <xsl:value-of select="$dir2"/> </node>
    <node> <xsl:value-of select="$dir3"/> </node>
    <node> <xsl:value-of select="$dir4"/>
      <leaf><xsl:value-of select="$file1"/></leaf>

I'm assuming you have a fixed number of dirs before the file. Hope this helps.


Yatin Shah <> wrote:

>Is there an existing component(a Matcher!) which will extract individual
>names from a URI?
>What I want is:
>Given http://hostname/cocoon/dir1/dir2/dir3/dir4/file1
>I want XML file as follows:
><node> cocoon </node>
><node> dir1 </node>
><node> dir2 </node>
><node> dir3 </node>
><node> dir4
>   <leaf>file1</leaf>
>[Although I do not need it, we can have <hostname>,<port>,<protocol>

>tags to the xml file as well].
>Yatin Shah, President             
>Kripa Inc.                        
>Dayton, New Jersey USA                      phone:  732.329.8303
>Developers of real time event driven distributed DB applications
>Please check that your question  has not already been answered in the
>FAQ before posting.     <>
>To unsubscribe, e-mail:     <>
>For additional commands, e-mail:   <>

Steven Cummings
Columbia, MO
AIM:   cummingscs
ICQ:   3330114

The NEW Netscape 7.0 browser is now available. Upgrade now!

Get your own FREE, personal Netscape Mail account today at

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message