Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Use</strong>:</p> <pre><code>/*/restriction/*[@value = /*/property[@name='value']]/@text </code></pre> <p>This selects any <code>text</code> attribute of any child element of <code>/*/restriction</code>, whose <code>value</code> attribute is equal to the string value of a <code>property</code> child of the top element, that (the <code>property</code> child) has a <code>name</code> attribute, whose string value is the string <code>"value"</code>.</p> <p><strong>If you don't want to select the attribute, but just its string value, use:</strong></p> <pre><code>string(/*/restriction/*[@value = /*/property[@name='value']]/@text) </code></pre> <p><strong>XSLT - based verification</strong>:</p> <p> </p> <pre><code> &lt;xsl:template match="/"&gt; &lt;xsl:value-of select= "/*/restriction/*[@value = /*/property[@name='value']]/@text"/&gt; ========== &lt;xsl:value-of select= "string(/*/restriction/*[@value = /*/property[@name='value']]/@text)"/&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p><strong>When this transformation is applied on the provided XML document:</strong></p> <pre><code>&lt;element type="Input" name="nationality"&gt; &lt;property i18n="true" text="Nationality" prefix="person.nationality." name="caption"&gt;caption&lt;/property&gt; &lt;property i18n="true" text="Nationality" prefix="person.nationality." name="desc"&gt;desc&lt;/property&gt; &lt;property name="visible"&gt;1&lt;/property&gt; &lt;property name="mandatory"&gt;0&lt;/property&gt; &lt;property name="value"&gt;AUS&lt;/property&gt; &lt;restriction prefix="country." base="String"&gt; &lt;enumeration text="Albania" value="ALB" /&gt; &lt;enumeration text="Algeria" value="DZA" /&gt; &lt;enumeration text="Argentina" value="ARG" /&gt; &lt;enumeration text="Australia" value="AUS" /&gt; &lt;enumeration text="Austria" value="AUT" /&gt; &lt;enumeration text="Bahrain" value="BHR" /&gt; &lt;/restriction&gt; &lt;/element&gt; </code></pre> <p><strong>the two xpath expressions are evaluated against the above document and the string values of the results of these evaluations (properly delimited) are copied to the output</strong>:</p> <pre><code>Australia ========== Australia </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload