forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diwaker Gupta <diwa...@apache.org>
Subject using forrest:property in contracts head section
Date Sun, 07 Aug 2005 07:41:14 GMT
Hey everyone,

As my travails with the Google Maps contract continue, I came across the 
following problem.

Consider the following snippet from this hypothetical contract:

 <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
    format="xhtml" name="content-google-maps" inputFormat="xsl" body="true"
    head="true">
    <xsl:stylesheet version="1.1" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template name="content-google-maps-head">
          <xsl:param name="content-google-maps-key"/>
          <div><xsl:value-of select="$content-google-maps-key"/></div>
 </xsl:template>
        <xsl:template name="content-google-maps-body">
          <xsl:param name="content-google-maps-key"/>
          <div><xsl:value-of select="$content-google-maps-key"/></div>
 </xsl:template>
     </xsl:stylesheet>
  </forrest:template>

And now I try to use it in my view thus:
 <forrest:contract name="content-google-maps">
   <forrest:properties contract="content-google-maps">
     <forrest:property
      name="content-google-maps-key">your-key-here</forrest:property>
   </forrest:properties>
  </forrest:contract>

In the generated output, I see in the <head> section: (unexpected behavior)
<div></div>

But in the body section, I see in the <body> section: (expected behavior)
<div>your-key-here</div>

Any idea whats going on here?

Diwaker
-- 
Web/Blog/Gallery: http://floatingsun.net

Mime
View raw message