Andreas Hartmann schrieb:
Jürgen Ragaller schrieb:
Hi!
I am using metadata in an xsl Transformation.
No problem to insert metadata as a text value of an element:
<tag>
<meta:value element="element-name"
ns="http://somedomain.ch/meta"
default="default-value"
uuid="[EMAIL PROTECTED]"
lang="{$language}"/>
</tag>
What I couldn't figure out: is there a possibility (or trick...) to
insert the metadata in an attribute? Having the metadata in an
attribute would make the subsequent xsl where the metadata is
interpreted much cleaner in my case.
That's not possible yet. But you can add a subsequent stylesheet to
convert the element value into an attribute, e.g.:
<xsl:template match="tag/text()">
<xsl:attribute name="...">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
I just noticed that this is not reliable if adjacent text nodes occur
instead of a combined one.
This may be better:
<xsl:template match="tag">
<tag attribute="{.}"/>
</xsl:template>
-- Andreas
You could also file an enhancement bug to add the functionality to the
meta data transformer, e.g.
<meta:attribute name="..."
element="element-name"
ns="http://somedomain.ch/meta"
default="default-value"
uuid="[EMAIL PROTECTED]"
lang="{$language}"/>
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]