Thank you,
This has solved my problem.
Bobo,
----- Original Message -----
From: "Jörg Heinicke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 13, 2001 6:02 PM
Subject: Re: problem with xml document() function


> The problem is to be searched in your XPATH-expressions in your
stylesheet.
> In your variable $menu the whole structure of menu.xml is stored, i.e.
> inclusive <menu>, <standard> and so on. With $menu/@href you will get the
> href-attribute of the root - there is non!
> You must delete the $menu if you have already matched on the right
elements:
>
> <xsl:variable name="menu" select="document('menu-admin.xml')"/>
>   <xsl:template name="getStandardLinks"> <tr>
>    <TD height="18" bgcolor="#295A84" width="135"><xsl:call-template
> name="teethIMG"/><br/>
>
>     <b>
>      <font color="#FFFFFF" size="1">
>       <xsl:value-of select="$menu/menu/standard/@s-header"/>
>      </font>
>     </b>
>    </TD>
>   </tr>
>
>   <xsl:for-each select="$menu//standard-link">
>    <tr>
>     <TD  height="18" bgcolor="#D5D9E1" width="135">
>      <A HREF="{@href}">
>       <b>
>        <font size="1" color="#000000">
>         <xsl:value-of select="@value"/>
>        </font>
>       </b>
>      </A>
>     </TD>
>    </tr>
>   </xsl:for-each>
> </xsl:template>
>
> Regards,
>
> Joerg
>
> Mamadou Bobo Sylla wrote:
> > Hello people.
> > I am having problem using document(). Here is the situation:
> > My menu.xml and remove-user.xml are in the same directory.
> > I don't get any result when I call  menu.xml inside remove-user.xsl by
using
> > document(menu.xml).
> > If I try document('menu.xml','/C:/cocoon/xml/admin'), only "STANDARD
> > FUNCTIONS" will be displayed.
> >
> > Well I need your help.Thank you in advance.
> >
> > Here is my menu.xml
> > -----
> > <menu>
> > <standard s-header="STANDARD FUNCTIONS ">
> >       <standard-link href="/ILS/under_construction.html"
value="SEARCH"/>
> >       <!--<standard-link href="/ILS/xml/user/faq.xml" value="VIEW FAQ"/>
> >       <standard-link href="/ILS/xsp/admin/profile.xml" value="MY
PROFILE"/>
> >       <standard-link href="/ILS/xml/search/search.xml"
value="SEARCH"/>-->
> >      </standard>
> > </menu>
> > -----
> > Here is my remove-user.xml:
> > -----
> > ?xml version="1.0"?>
> > <?cocoon-process type="xslt"?>
> > <?xml-stylesheet href="../../xsl/admin/remove-user-form.xsl"
type="text/xsl
> > <remove-user-form>
> > <title> ILS - REMOVING USER </title>
> > <header>REMOVING USER FROM ILS</header>
> > <guide>Enter the user ID that you intend to remove from ILS.</guide>
> > <admin-menu/>
> > </remove-user-form>
> > --
> > Here is my remove-user.xsl:
> > --
> > <xsl:variable name="menu" select="document('menu-admin.xml')"/>
> >  <xsl:template name="getStandardLinks"> <tr>
> >    <TD height="18" bgcolor="#295A84" width="135"><xsl:call-template
> > name="teethIMG"/><br/>
> >
> >     <b>
> >      <font color="#FFFFFF" size="1">
> >       <xsl:value-of select="$menu//@s-header"/>
> >      </font>
> >     </b>
> >    </TD>
> >   </tr>
> >
> >  <xsl:for-each select="$menu//standard-link">
> >
> >   <tr>
> >    <TD  height="18" bgcolor="#D5D9E1" width="135">
> >     <A HREF="{$menu/@href}">
> >      <b>
> >       <font size="1" color="#000000">
> >        <xsl:value-of select="$menu/@value"/>
> >       </font>
> >      </b>
> >     </A>
> >    </TD>
> >   </tr>
> >
> >  </xsl:for-each>
> >  </xsl:template>
> > ====
> > Bobo
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to