You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ovidiu Predescu <ov...@cup.hp.com> on 2001/09/10 06:25:11 UTC

Re: Docbook and Cocoon?

On Sun, 9 Sep 2001 18:48:52 +0200, Konstantin Agouros <Ko...@netage.de> wrote:

> On Sat, Sep 08, 2001 at 07:54:15PM +0200, Konstantin Agouros wrote:
> > Hi,
> > 
> > thanks for the file. I tried this as well with xalan on the
> > commandline as with cocoon. Now I don't get an endless loop but a
> > Java.lang.outofmemory.  I guess I have to start the JVM with more
> > virtual memory (I use the oasis docbook.dtd) and JDK 1.17. But it
> > is really slow until it gets to the error.  So is this whole idea
> > a workable solution for interactive cocooning?
> > 
> So I got it working now after starting the jvm with -mx64m. However
> cocoon 1.8.2 (or the xerces/xalan that come with it) do now work on
> docbook. Another issue is computing time. When I use xalan by hand
> on an athlon 1.1Ghz it takes 30seconds for the translation of
> Marinas simple example file. So how do I get docbook-files to a
> workable solution with cocoon?

If you're an XEmacs/GNU Emacs user, you can try my XSLT-process
mode. The latest version 2.1 has support for DocBook through the
DocBook-XSL stylesheets. The supporting JVM is started only once, so
processing the XML document runs quite fast from the second run
onward.

You can find the XSLT-process mode at:

http://xslt-process.sourceforge.net/index.php


Regards,
-- 
Ovidiu Predescu <ov...@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://sourceforge.net/users/ovidiu/ (my SourceForge page)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Docbook and Cocoon?

Posted by Colin Paul Adams <co...@colina.demon.co.uk>.
>>>>> "Konstantin" == Konstantin Agouros <Ko...@netage.de> writes:

    Konstantin> Yes I use Emacs (btw is there a docbook-mode for emacs
    Konstantin> I am sure there is, but where)

See www.nwalsh.com
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: problem with xml document() function

Posted by Mamadou Bobo Sylla <bo...@ewarna.com>.
Thank you,
This has solved my problem.
Bobo,
----- Original Message -----
From: "Jörg Heinicke" <jh...@virbus.de>
To: <co...@xml.apache.org>
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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: problem with xml document() function

Posted by Jörg Heinicke <jh...@virbus.de>.
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


problem with xml document() function

Posted by Mamadou Bobo Sylla <bo...@ewarna.com>.
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Docbook and Cocoon?

Posted by Konstantin Agouros <Ko...@netage.de>.
On Sun, Sep 09, 2001 at 09:25:11PM -0700, Ovidiu Predescu wrote:
> On Sun, 9 Sep 2001 18:48:52 +0200, Konstantin Agouros <Ko...@netage.de> wrote:
> 
> > On Sat, Sep 08, 2001 at 07:54:15PM +0200, Konstantin Agouros wrote:
> > > Hi,
> > > 
> > > thanks for the file. I tried this as well with xalan on the
> > > commandline as with cocoon. Now I don't get an endless loop but a
> > > Java.lang.outofmemory.  I guess I have to start the JVM with more
> > > virtual memory (I use the oasis docbook.dtd) and JDK 1.17. But it
> > > is really slow until it gets to the error.  So is this whole idea
> > > a workable solution for interactive cocooning?
> > > 
> > So I got it working now after starting the jvm with -mx64m. However
> > cocoon 1.8.2 (or the xerces/xalan that come with it) do now work on
> > docbook. Another issue is computing time. When I use xalan by hand
> > on an athlon 1.1Ghz it takes 30seconds for the translation of
> > Marinas simple example file. So how do I get docbook-files to a
> > workable solution with cocoon?
> 
> If you're an XEmacs/GNU Emacs user, you can try my XSLT-process
> mode. The latest version 2.1 has support for DocBook through the
> DocBook-XSL stylesheets. The supporting JVM is started only once, so
> processing the XML document runs quite fast from the second run
> onward.
Yes I use Emacs (btw is there a docbook-mode for emacs I am sure there is,
but where)

But what I plan to do is:
Put up my companies technical information (which machine is installed with what)
in docbook/xml. Then use cocoon to visualize it.

Konstantin
> 
> You can find the XSLT-process mode at:
> 
> http://xslt-process.sourceforge.net/index.php
> 
> 
> Regards,
> -- 
> Ovidiu Predescu <ov...@cup.hp.com>
> http://orion.nsr.hp.com/ (inside HP's firewall only)
> http://sourceforge.net/users/ovidiu/ (my SourceForge page)
> http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)

-- 
Konstantin Agouros - NetAge Solutions, Dingolfinger Str. 6, 81673 Muenchen
Tel.: 089 666584-0, Fax: 089 666584-11, Email: Konstantin.Agouros@netage.de
--------------------------------------------------------------------------
Black holes are, where god divided by zero.

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>