Subject: RE: [xsl] Trying to read a parameter in the request in a XSL file From: "Diodato, Anthony" <adiodato@xxxxxxx> Date: Mon, 6 Oct 2003 14:55:54 -0400 |
I think I may have something configured improperly, and maybe could be the reason this isn't working for me. I used to use cocoon 1.8.2, and with that I had an index.xml file and foo.xsl file. http://localhost/index.xml Now, using 1.8.2, when I would browse to that page and view the source, I would see the HTML that I had for the xml tags in my foo.xsl file. With Cocoon 2.1, if I view the source, I see the xml code that is in my index.xml file. Does that mean that my XSLT isnt working properly?? I would think that I would be able to view the source, and see the html. Thanks Tony -----Original Message----- From: Robert Koberg [mailto:rob@xxxxxxxxxx] Sent: Friday, October 03, 2003 5:07 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Trying to read a parameter in the request in a XSL file Hi, I am going to assume you want to give this view so people can easily see the site structure and to assure it makes sense. If that is so, then I would avoid using element names like level1, level2, leveln. If they see it and want to change things around you will have to back and rename your elements rather than simply moving nodes. That being said, we use something like: <site> <folder> <page/> <page/> <folder> <page/> <page/> </folder> </folder> </site> Here is an XSL that creates a tree similar to what I think you want. It uses different element names and attrs than you describe but hopefully you can extract what you need. Best, -Rob <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lsb="http://livestoryboard.com/lsb/schemas/2003/03/config"> <xsl:output method="html" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <html> <head> <title>Navigation</title> <style type="text/css" media="all"> @import "css/nav.css"; </style> </head> <body> <form id="nav_form" action="DisplayNav" method="post"/> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="lsb:page | lsb:folder | lsb:site"> <xsl:variable name="local_name" select="local-name()"/> <div class="{$local_name}" lsb_type="SiteNode"> <xsl:copy-of select="@*"/> <xsl:variable name="id" select="@id"/> <xsl:attribute name="style"> <xsl:text>display:block;</xsl:text> </xsl:attribute> <xsl:attribute name="title"> <xsl:value-of select="lsb:title"/> </xsl:attribute> <div class="navHandle" id="{$id}_tggl"> <xsl:if test="not($local_name='page') and (boolean(lsb:page) or boolean(lsb:folder))"> <xsl:attribute name="onclick"> <xsl:text>top.oNAV._lsb_m_hideChildren(</xsl:text> <xsl:value-of select="$id"/> <xsl:text>)</xsl:text> </xsl:attribute> </xsl:if> <img id="{$id}_tggl_img" height="9" width="9"> <xsl:attribute name="src"> <xsl:choose> <xsl:when test="not($local_name='page') and (boolean(lsb:page) or boolean(lsb:folder))"> <xsl:text>images/minus.gif</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>images/dot.gif</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:attribute> </img> </div> <div class="navImg"> <img height="10" src="images/{$local_name}_icon.gif" width="13"/> </div> <div class="labelBlur" id="{$id}_lbl"> <xsl:attribute name="onclick"> <xsl:text>top.oNAV._lsb_m_navigate(</xsl:text> <xsl:value-of select="$id"/> <xsl:text>)</xsl:text> </xsl:attribute> <xsl:choose> <xsl:when test="boolean(lsb:label)"> <xsl:value-of select="lsb:label"/> </xsl:when> <xsl:when test="boolean(@name)"> <xsl:value-of select="@name"/> </xsl:when> <xsl:when test="text()"> <xsl:value-of select="normalize-space(.)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$local_name"/> </xsl:otherwise> </xsl:choose> </div> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="lsb:label | text() | lsb:title | lsb:regions"/> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting Entity File Names, G. Ken Holman | Thread | RE: [xsl] Re: msxsl:script and sele, Murali Korrapati |
RE: XSLT 2.0 dynamically parameteri, Michael Kay | Date | RE: [xsl] XSLT Problem - Random Ord, Michael Kay |
Month |