开发者

How can I match <titlealts> using XSLT?

I'm trying to match the following and apply a style to it:

<titlealts>some string in here</titlealts>

but I just can't seem to get it.

I am able to match the following:

<p outputclass="hiddenMeta">Division A</p>

by using

<xsl:template match="p[@outputclass='hiddenMeta']">
   <fo:block padding-bottom="0pt" padding-top="0pt" 
             margin-top="0pt" margin-bottom="0pt">
     <xsl:apply-templates/>
   </fo:block>
</xsl:template>

but am having real difficulty trying to match something simple like:

<titlealts>1&#x2003;Definition of parental responsibility (Division A Parental Responsibility and Guardianship)</titlealts>

I have tried:

<xsl:template n开发者_运维问答ame="titlealts">
<xsl:template match="titlealts">
<xsl:template match="titlealtws[*]">

with no luck at all and am really starting to feel like the noob I am.


It must be something else in your XSLT that preventing the match from working. The template <xsl:template match="titlealts"> should work.

What you can do is start working backwards from <titlealts> up through the parent/ancestors and find which template is preventing the match from happening. It could be that you are using an xsl:value-of instead of xsl:apply-templates in a higher level template.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜