On Thu, 2008-08-21 at 10:00 +0300, Sjur Moshagen wrote:
> Hello all,
>
> I'm getting very strange errors after I aggregated the output from
> module.properties.properties, as suggested by Ross in [1].
>
> Here's briefly the history of my attempts, and the XPath behaviour:
>
> - first aggregation (in o.a.f.p.output.pdf/output.xmap):
>
> <map:aggregate element="site">
> <map:part src="cocoon://skinconf.xml"/>
Hmm, skinconf? You know my opinion about dependencies to skinconf. If
you use module.properties.properties the skinconf is obsolete. More
since this plugin should adopt the new properties system.
> <map:part src="cocoon://module.properties.properties"/>
> <map:part src="cocoon://{1}{2}.xml"/>
> </map:aggregate>
>
> (note, the properties module is the second part in the aggregation)
>
> XSLT/XPath problems (in o.a.f.p.output.pdf/resources/stylesheets/
> document-to-fo.xsl):
>
> 1)
> <xsl:variable
> name="properties"
> select="//properties" />
>
> Expected result: all properties available as daughters of $properties
> Actual result: nothing assigned to the variable
Yes because you are not using the namespace. The result is:
<properties xmlns:forrest="http://apache.org/forrest/properties/1.0"
xmlns="http://apache.org/forrest/properties/1.0"
input-module="properties">
Meaning you would need to use something
like ...select="//forrest:properties" (do not forget to declare the ns)
...
> This is a simple XPath expression! I really do not understand what is
> going on.
Try the namespace. ;)
HTH
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions