You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Jann Forrer <ja...@id.unizh.ch> on 2004/09/16 16:26:03 UTC

Handle new attribute in sitetree.xml

Hi

I updated the DocumentCreator (and other relevant) classes in order to add
an new attribute (isvisible) to the sitetree e.g:

...
<node id="sichtbar" isvisible="true">
<label xml:lang="de">sichtbar</label>
</node>
<node id="unsichtbar" isvisible="false">
<label xml:lang="de">unsichtbar</label>
</node>
...

This work quite fine. However when I tried to hide this node in the
navigation by updating the menu.xsl as proposed on this mailing list some
days ago:

<xsl:template match="nav:node[@isvisible = 'false']"/>

<xsl:template match="nav:node">
  <xsl:call-template name="item"/>
  <xsl:apply-templates select="nav:node"/>
</xsl:template>

nothing really happend i.e the node *unsichtbar" is still visible :-(
But if i use the id attribute to match the node:

<xsl:template match="nav:node[@id = 'unsichtbar']"/>

the appropriate name really disapear in the navigation.

Any hints what i am doing wrong here?

Jann

---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich

oooO   mail:  jann.forrer@id.unizh.ch
(  )   phone: +41 1 63 56772
 \ (   fax:   +41 1 63 54505
  \_)  http://www.id.unizh.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Edith Chevrier <ed...@wyona.com>.
Rolf Kulemann wrote:

>On Thu, 2004-09-16 at 16:29, Andreas Hartmann wrote:
>  
>
>>Jann Forrer wrote:
>>    
>>
>>>Hi
>>>
>>>I updated the DocumentCreator (and other relevant) classes in order to add
>>>an new attribute (isvisible) to the sitetree e.g:
>>>
>>>...
>>><node id="sichtbar" isvisible="true">
>>><label xml:lang="de">sichtbar</label>
>>></node>
>>><node id="unsichtbar" isvisible="false">
>>><label xml:lang="de">unsichtbar</label>
>>></node>
>>>...
>>>
>>>This work quite fine. However when I tried to hide this node in the
>>>navigation by updating the menu.xsl as proposed on this mailing list some
>>>days ago:
>>>
>>><xsl:template match="nav:node[@isvisible = 'false']"/>
>>>
>>><xsl:template match="nav:node">
>>>  <xsl:call-template name="item"/>
>>>  <xsl:apply-templates select="nav:node"/>
>>></xsl:template>
>>>
>>>nothing really happend i.e the node *unsichtbar" is still visible :-(
>>>      
>>>
>>[...]
>>
>>The sitetree is tranformed into the navigation tree by
>>lenya/xslt/sitetree2nav.xsl.
>>    
>>
>
>Exactly, and the xslt already takes care of that feature, but it expects
>another name of the attribute. The copying to live tree was/is missing.
>
>  
>
Look at bugs 28509 and 28501

Edith


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Thu, 16 Sep 2004, Rolf Kulemann wrote:

[...]
> >
> > The sitetree is tranformed into the navigation tree by
> > lenya/xslt/sitetree2nav.xsl.
>
> Exactly, and the xslt already takes care of that feature, but it expects
> another name of the attribute. The copying to live tree was/is missing.
>
As already answered to Andreas the node disappear in the site area to if
the name of the attribute is visible.
I did not check to copying to the live are yet. What is the effort to
implement that?

Jann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Rolf Kulemann <ro...@apache.org>.
On Thu, 2004-09-16 at 16:29, Andreas Hartmann wrote:
> Jann Forrer wrote:
> > Hi
> > 
> > I updated the DocumentCreator (and other relevant) classes in order to add
> > an new attribute (isvisible) to the sitetree e.g:
> > 
> > ...
> > <node id="sichtbar" isvisible="true">
> > <label xml:lang="de">sichtbar</label>
> > </node>
> > <node id="unsichtbar" isvisible="false">
> > <label xml:lang="de">unsichtbar</label>
> > </node>
> > ...
> > 
> > This work quite fine. However when I tried to hide this node in the
> > navigation by updating the menu.xsl as proposed on this mailing list some
> > days ago:
> > 
> > <xsl:template match="nav:node[@isvisible = 'false']"/>
> > 
> > <xsl:template match="nav:node">
> >   <xsl:call-template name="item"/>
> >   <xsl:apply-templates select="nav:node"/>
> > </xsl:template>
> > 
> > nothing really happend i.e the node *unsichtbar" is still visible :-(
> 
> [...]
> 
> The sitetree is tranformed into the navigation tree by
> lenya/xslt/sitetree2nav.xsl.

Exactly, and the xslt already takes care of that feature, but it expects
another name of the attribute. The copying to live tree was/is missing.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Rolf Kulemann <ro...@apache.org>.
On Fri, 2004-09-24 at 18:03, Jann Forrer wrote:
> On Thu, 16 Sep 2004, Gregor J. Rothfuss wrote:
> 
> > Jann Forrer wrote:
> > > After some testing I certainly can file an enhancment bug.
> > > There are several files involved. Shall I send a patch for every file to
> > > bugzilla?
> >
> > one big patch file is fine.
> >
> 
> Some days ago,  i sent a patch (Bugzilla Bug 31357), which enables the
> user to hide a document in the navigation. At the present stage it is
> only possible to set the visibility of a doucument during its creation.
> 
> It would be nice if the user could change the visibility of an existing
> document via UI. Therefore  I am thinking of a menu entry (as done for
> "Edit Navigation Title") or a kind of checkbox (as for SSL Encryption)
> called  "Change visiblility of document" to change the appropriate
> attribute.
> 
> WDTY?

IMHO it would make sense to let the user edit the attribute.
Via checkbox sounds good to me.
-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Thu, 16 Sep 2004, Gregor J. Rothfuss wrote:

> Jann Forrer wrote:
> > After some testing I certainly can file an enhancment bug.
> > There are several files involved. Shall I send a patch for every file to
> > bugzilla?
>
> one big patch file is fine.
>

Some days ago,  i sent a patch (Bugzilla Bug 31357), which enables the
user to hide a document in the navigation. At the present stage it is
only possible to set the visibility of a doucument during its creation.

It would be nice if the user could change the visibility of an existing
document via UI. Therefore  I am thinking of a menu entry (as done for
"Edit Navigation Title") or a kind of checkbox (as for SSL Encryption)
called  "Change visiblility of document" to change the appropriate
attribute.

WDTY?

Jann

---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich

oooO   mail:  jann.forrer@id.unizh.ch
(  )   phone: +41 1 63 56772
 \ (   fax:   +41 1 63 54505
  \_)  http://www.id.unizh.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Jann Forrer wrote:
> After some testing I certainly can file an enhancment bug.
> There are several files involved. Shall I send a patch for every file to
> bugzilla?

one big patch file is fine.

-- 
Gregor J. Rothfuss
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                   http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com                       gregor@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Thu, 16 Sep 2004, Andreas Hartmann wrote:

[...]
>
> The sitetree is tranformed into the navigation tree by
> lenya/xslt/sitetree2nav.xsl.
>
> Probably the @isvisible attribute is not copied to the
> result tree.
>
That was really the reason. Now it seems to work :-)

> BTW, I could imagine to rename "isvisible" to "visible" and
> include it in the core (this is a frequently mentioned feature
> request). Maybe you'd like to file an enhancement bug?
>

At first the name of the attribute was visible but than the nodes
disappear in the site area too probably due to:

<xsl:template match="tree:node[not(@visible = 'false')]">

in the sitetree2nav.xsl. But I want to see the node in the site area but
not in the navigation of the document.

After some testing I certainly can file an enhancment bug.
There are several files involved. Shall I send a patch for every file to
bugzilla?

Jann


---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich

oooO   mail:  jann.forrer@id.unizh.ch
(  )   phone: +41 1 63 56772
 \ (   fax:   +41 1 63 54505
  \_)  http://www.id.unizh.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Handle new attribute in sitetree.xml

Posted by Andreas Hartmann <an...@apache.org>.
Jann Forrer wrote:
> Hi
> 
> I updated the DocumentCreator (and other relevant) classes in order to add
> an new attribute (isvisible) to the sitetree e.g:
> 
> ...
> <node id="sichtbar" isvisible="true">
> <label xml:lang="de">sichtbar</label>
> </node>
> <node id="unsichtbar" isvisible="false">
> <label xml:lang="de">unsichtbar</label>
> </node>
> ...
> 
> This work quite fine. However when I tried to hide this node in the
> navigation by updating the menu.xsl as proposed on this mailing list some
> days ago:
> 
> <xsl:template match="nav:node[@isvisible = 'false']"/>
> 
> <xsl:template match="nav:node">
>   <xsl:call-template name="item"/>
>   <xsl:apply-templates select="nav:node"/>
> </xsl:template>
> 
> nothing really happend i.e the node *unsichtbar" is still visible :-(

[...]

The sitetree is tranformed into the navigation tree by
lenya/xslt/sitetree2nav.xsl.

Probably the @isvisible attribute is not copied to the
result tree.

BTW, I could imagine to rename "isvisible" to "visible" and
include it in the core (this is a frequently mentioned feature
request). Maybe you'd like to file an enhancement bug?

HTH,
-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org