Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 291098 - Last Review: October 16, 2002 - Revision: 1.4
FIX: XPATH/XSLT Function-Available (Element-Available) Returns False
This article was previously published under Q291098
When you use the XPATH/XSL
function-available function, you see that the function returns
False for the XPATH/XSL
element-available function, although the
element-available function is implemented in Microsoft XML 3.0.
You expect
function-available to return
True for implemented XPATH/XSL functions.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This bug was corrected in Microsoft XML 3.0 Service Pack 1.
For additional information on other fixes included in Microsoft XML 3.0 Service Pack 1, click the article number below
to view the article in the Microsoft Knowledge Base:
292935Â
(http://kbalertz.com/Feedback.aspx?kbNumber=292935/EN-US/
)
INFO: List of Issues Fixed in Microsoft XML 3.0 Service Pack 1
For the latest information and downloads of MSXML, refer to the following MSDN Web site at:
Steps to Reproduce Behavior
- Create the XML document containing several XPATH/XSL function names, including element-available function. The XML document refers to an XSL stylesheet.
- Create a new text document by using Microsoft Notepad or another text editor.
- Paste the following code into the new text document:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="functions.xsl"?>
<functions>
<function>boolean</function>
<function>ceiling</function>
<function>concat</function>
<function>contains</function>
<function>count</function>
<function>element-available</function>
<function>floor</function>
<function>function-available</function>
</functions>
- Save the text file as C:\Functions.XML.
- Create the XSL stylesheet to process the XML document. The XSL stylesheet checks each function listed in the XML document to see if the function is available in XSL. The stylesheet uses the XSL function-available function to check each function name.
- Create a new text document by using Microsoft Notepad or another text editor.
- Paste the following code into the new text document:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="http://support.microsoft.com//function">
<xsl:if test="function-available(.) = False">
function-available is False for <xsl:value-of select="."/>  
</xsl:if>
</xsl:template>
</xsl:stylesheet>
- Save the text file as C:\Functions.XSL.
- Open the XML document in Microsoft Internet Explorer (IE) to process the XML document using the XSL stylesheet. Note that the following output indicates that function-available function returned False:
function-available is False for element-available
| kbbug kbfix kbmsxml300sp1fix kbmsxmlnosweep KB291098 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate