 |
 |
 |
Mark Anderson wrote:
Thanks Guys
In my application, I will only need to process a few hundred nodes and
about 20-30 of the type where I need to use the choose statement.
??
Sounds like you want a copy idiom with some template matches instead of
xsl:choose (or remove the copy if you meant with the above that you want
to remove all the things not in the xsl:choose)
I went with the <xsl:if test=self::speaker> option as I still use the
namespace (e.g. <xsl:if test=self::abc:speaker>). Whereas localname
returned the node name without the ns prefix
Correct, as already been stated in this thread. If you find yourself
doing test="self::ns:speaker" or similar, it is almost always better to
do xsl:apply-templates with xsl:template matching. XSLT code only rarely
really needs xsl:choose or xsl:if statements. Note that apply-templates
automatically does nothing when the selected node set is not there.
Cheers,
-- Abel Braaksma
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |