Note that there are some explanatory texts on larger screens.

plurals
  1. POdocument() function in XSLT1.0
    text
    copied!<p>I want to display a xml in a IE browser directly using xslt 1.0 without any engine.I could get some code from the source xml,then I want to get the corresponding displayname to this code from a external xml named voc.xml.but I could not get the displayname following these instructions 1.define a document variable in the xsl</p> <pre><code>&lt;xsl:variable name="voc" select="document('voc.xml')"/&gt; </code></pre> <p>2.get the code following my own xpath and I can get the value of the variable 'paytypecode'='01'<br> 3.find the corresponding code in the voc.xml</p> <pre><code>&lt;xsl:variable name='mappedpaytypecode' select="$voc//systems/system[@root='CV07.10.003医疗费用来源类别代码表']/code[@value='01']"/&gt; </code></pre> <p>4.get the displayName of this corresponding code in the voc.xml</p> <pre><code>&lt;xsl:variable name='displayName_value' select="$mappedpaytypecode/@displayname"/&gt; </code></pre> <p>and the voc.xml is like this</p> <pre><code>&lt;systems&gt; &lt;system codeSystemName="CV07.10.003医疗费用来源类别代码表" root="CV07.10.003医疗费用来源类别代码表"&gt; &lt;code value="01" displayname="城镇职工基本医疗保险" /&gt; &lt;code value="02" displayname="城镇居民基本医疗保险" /&gt; &lt;code value="03" displayname="新型农村合作医疗" /&gt; &lt;code value="04" displayname="贫困救助" /&gt; &lt;code value="05" displayname="商业医疗保险" /&gt; &lt;code value="06" displayname="全公费" /&gt; &lt;code value="07" displayname="全自费" /&gt; &lt;code value="99" displayname="其他" /&gt; &lt;/system&gt; &lt;/systems&gt; </code></pre>
 

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