What this stands for in xsl? match=“@*|node()”

前端 未结 1 1961
情话喂你
情话喂你 2021-02-15 14:00

Can anyone explain what this means in xsl? Exactly what does each expression stands for


1条回答
  •  一向
    一向 (楼主)
    2021-02-15 14:18

    @* matches any attribute node, and node() matches any other kind of node (element, text node, processing instruction or comment). So a template matching @*|node() will apply to any node that is not consumed by a more specific template.

    The most common example of this is the identity template

    
      
    
    

    which copies the input XML to the output tree verbatim. You can then override this template with more specific ones that apply to particular nodes to make small tweaks to the XML, for example, this stylesheet would create an output XML that is identical to the input except that all foo elements have had their names changed to bar:

    
      
        
      
    
      
        
      
    
    

    0 讨论(0)
提交回复
热议问题