Difference between * and node() in XSLT

前端 未结 3 1858
萌比男神i
萌比男神i 2020-12-29 03:59

What\'s the difference between these two templates?




3条回答
  •  春和景丽
    2020-12-29 04:30

    
    

    is an abbreviation for:

    
    

    This matches any node type that can be selected via the child:: axis:

    • element

    • text-node

    • processing-instruction (PI) node

    • comment node.

    On the other side:

    
    

    is an abbreviation for:

    
    

    This matches any element.

    The XPath expression: someAxis::* matches any node of the primary node-type for the given axis.

    For the child:: axis the primary node-type is element.

提交回复
热议问题