xsl-list
[Top] [All Lists]

[xsl] node functions

2008-08-05 07:53:15
Hi:

I have two xml files which have common elements between them. 

file1.xml:

<test>
<info>
<pub>
</pub>
</info>
</test>

file2.xml
<test2>
<info>
<requirement>
<level1>
<para></para>
<pub></pub>
</level1>
</requirement>
</info>
</test2>


So, info and pub are two common elements between there two xml files. So there 
is a common style sheet just for pub called pub.xsl. pub has an attribute level 
which can be set to 1~4.
But in one commong style sheet, I want to apply templates for all //info 
elements and not include //pub elements which have @level='1'

I tried:

<xsl:choose>
<xsl:when test="//info(not[self::pub[(_at_)level='1']">

<xsl:apply-templates select="//info(not[self::pub[(_at_)level='1']">
</xsl:when>
</xsl:choose>

This is obv wrong because the processor complains about it.

Howcan I achieve this to say apply templates for only those <info> elements 
which do not have @level in <pub> set to '1'.

Thanks in advance for all your help.



      


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>