Are .NET 3.5 XPath classes and methods XSLT 2.0 compatible?

后端 未结 6 1858
萌比男神i
萌比男神i 2021-01-06 15:06

I\'d like to use regular expressions in selecting elements using the match function. I\'d prefer not to use an external library (such as saxon) to do this.

6条回答
  •  生来不讨喜
    2021-01-06 15:51

    When discussing .NET support for XSLT 2.0, XPath 2.0, and XQuery 1.0, it is important to distinguish between the languages themselves and the Data Model (XDM). The .NET 3.5 Framework supports the Data Model, but not the languages. As it was recently explained to me via email correspondence by Microsoft's Pawel Kadluczka:

    The sentence "instances of the XQuery 1.0 and XPath 2.0 Data Model" may be confusing but I believe it refers to W3C XQuery 1.0 and XPath 2.0 Data Model (XDM) spec (http://www.w3.org/TR/xpath-datamodel) that reads:

    [Definition: Every instance of the data model is a sequence.].

    [Definition: A sequence is an ordered collection of zero or more items.] A sequence cannot be a member of a sequence. A single item appearing on its own is modeled as a sequence containing one item. Sequences are defined in 2.5 Sequences.

    [Definition: An item is either a node or an atomic value],

    In the case of XPath API - XPathNodeIterator is the sequence while XPathItem (XPathNavigator) represents the item.

提交回复
热议问题