在编程时使用到这个枚举,调试老出错,后发现两个值是一样的,两个都是等于1,我使用的是.NET2.0
Xml.XPath.XPathResultType.String = 1
Xml.XPath.XPathResultType.Navigator = 1
Xml.XPath.XPathResultType.String = 1
Xml.XPath.XPathResultType.Navigator = 1
解决方案 »
- 1.1版的MenuItem有MdiList属于,可列示打到的窗体??在2.0的ToolstripMenu对应的属性是什么??
- 怎么实现textbox与listbox连接
- 求一个SQL 2005中文版的下载地址
- 请教打印的问题
- VS2005里有一个回到前一位置的功能,在哪里?
- [高分-顶者有分]关于PropertyGrid控件实现下拉选择属性的问题?
- win 2000 server下没有超级用户权限,注册表被设置为不能修改,装啥都装不了,怎么办啊???
- datepicker的使用问题
- C#中将字符串数字转化为整数的函数是什么呀?(不会越界)
- 刚装完了VS 。NET然后用VB7写了一个最简单的程序,为什么编译的时候通不过??老提示什么连不到网络上??
- 写SQL语句的问题,怎么判断字段里的日期是否为今天?
- 怎么判断一个类型是否继承另一个类型?
例如public enum color
{
blace=0,red,yellow=1
}
red和yellow都为1
Xml.XPath.XPathResultType.String = 1
Xml.XPath.XPathResultType.Navigator = 4才对
Xml.XPath.XPathResultType.Navigator = 4 ---1,4是什么意思?
Any 任何一种 XPath 节点类型。
Boolean Booleantrue 或 false 值。
Error 该表达式的计算结果不是正确的 XPath 类型。
Navigator 一个树片段。
NodeSet 一个节点集合。
Number 一个数值。
String String 值。 楼主好厉害哦,这都能碰到
5 2 6 1 3 0 1
由 Microsoft 在 2005/2/9 12:28 发送
It is not a workaround. Result tree fragment and node set are different.Is there KB article?
由 AtsushiEno 在 2005/2/11 18:55 发送
Also, note that current XslTransform has a bug which seems related to this XPathResultType value. For example,<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><!-- FileName: select67 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 12.1 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test that document('') refers to this stylesheet, and exploit
that fact to choose a template dynamically. Idea from Mike Kay. --><xsl:template match="/document-element">
<xsl:variable name="whichtmplt" select="'this'"/>
<out>
<xsl:apply-templates select="document('')/*/xsl:template[@name=$whichtmplt]"/>
<xsl:apply-templates/>
</out>
</xsl:template><xsl:template name="this" match="xsl:template[@name='this']">We are inside.
<xsl:value-of select="name(.)"/>
</xsl:template><xsl:template name="that" match="xsl:template[@name='that']">We are offside.
<xsl:value-of select="name(.)"/>
</xsl:template><xsl:template name="the_other" match="*">We are generic.
<xsl:value-of select="name(.)"/>
</xsl:template></xsl:stylesheet>XslTransform fails to generate correct result for this OASIS test (select_select67.xsl)
http://www.oasis-open.org/committees/documents.php?wg_abbrev=xslt由 AtsushiEno 在 2005/2/17 22:22 发送
I believe this problem is a result of using the document() function with an empty string. The XSLT specification specifies that this maps to the stylesheet being executed. However, the System.Xml implementation does not do this as it leads to memory overhead because the original stylesheet must always be cached. We feel that apart from test cases, this feature is not interesting in real-world scenarios.Thank you for your feedback,
Arpan Desai
Program Manager
由 Microsoft 在 2005/3/21 11:18 发送
You seems right. I reexamined and it only happens when the input was XmlDocument. So it must not be because of this enum. Sorry for confusion.
由 AtsushiEno 在 2005/3/22 5:25 发送Product LanguageEnglishVersionCommunity Technology Preview October 2004CategoryXMLSubcategory Operating SystemWindows 2000 ProfessionalSteps to Reproduceusing System;
using System.Xml.XPath;
public class Tst
{
public static void Main ()
{
foreach (XPathResultType e in Enum.GetValues (typeof (XPathResultType)))
Console.WriteLine ("{0} is {1}", e, (int) e);
}
}
Actual ResultsNumber is 0
String is 1
String is 1
Boolean is 2
NodeSet is 3
Any is 5
Error is 6Expected ResultsNumber is 0
String is 1
Boolean is 2
NodeSet is 3
Navigator is 4
Any is 5
Error is 6