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

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -