How to select xml element based on its attribute value start with "Heading" in xslt?

Viewed 9069

I want to call my own xsl template whenever i found the matching of xml element that having its attribute value starting with "Heading". How do I make this query in Xslt.

For example:

<w:p>
  <w:pPr>
     <w:pStyle w:val="Heading2"/>
  </w:pPr>
</w:p>

<w:p>
  <w:pPr>
     <w:pStyle w:val="Heading1"/>
  </w:pPr>
</w:p>

<w:p>
  <w:pPr>
     <w:pStyle w:val="Heading2"/>
  </w:pPr>
</w:p>

<w:p>
  <w:pPr>
     <w:pStyle w:val="ListParagraph"/>
  </w:pPr>
</w:p>

<w:p>
  <w:pPr>
     <w:pStyle w:val="commentText"/>
  </w:pPr>
</w:p>

So, I want to make query that w:pStyle -> w:val starting with "Heading" only.

1 Answers
Related