xml - XSLT - check attribute is exist or not -


i'm new xslt. may simple question,

example : xml

<doc>    <sec id="sec_2" sec-type="norm-refs"> </doc> 

i need know there <sec> node containing attribute sec-type='node-refs', exist or not in original xml document.

this simple xpath:

//sec[@type="norm-refs"] 

the @ symbol indicates want attribute matches, not element. square brackets indicate want matches selector returns comes before square brackets.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -