| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright 2002-2005 The Apache Software Foundation or its licensors, |
| as applicable. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <forrest:contract name="nav-main-testing-foo" type="nugget" |
| xmlns:forrest="http://apache.org/forrest/templates/1.0"> |
| <description> |
| nav-main will output the main or primary navigation AKA tabs. |
| </description> |
| <usage><![CDATA[<forrest:contract name="nav-main-testing-foo" nugget="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>]]> |
| </usage> |
| <forrest:template |
| xmlns:forrest="http://apache.org/forrest/templates/1.0" |
| format="html" name="nav-main-testing-foo" inputFormat="xsl" > |
| <xsl:stylesheet version="1.1" |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| <xsl:param name="defaultVariables" select="'test.html'"/> |
| <xsl:variable name="path" select="$defaultVariables/*/*[@name='path']/@value"/> |
| <xsl:template match="/" > |
| <forrest:content> |
| <forrest:part> nav-main-testing-foo testing - no @xpath<br/> |
| Path: <xsl:value-of select="$path"/><br/> |
| skin-img-dir: <xsl:copy-of select="$defaultVariables/*/*"/> value: |
| <xsl:value-of select="$defaultVariables/*/*[@name='skin-img-dir']/@value"/> |
| <!--copy-of --> |
| </forrest:part> |
| </forrest:content> |
| </xsl:template> |
| </xsl:stylesheet> |
| </forrest:template> |
| </forrest:contract> |