title: ORA-19228: XPST0008 - undeclared identifier in oracle sql
body: <p>I have xml string which i have mentioned below and i want to extract code from xml string. I have written below select query to extract the value from <code>&lt;ax2140:code&gt;0&lt;/ax2140:code&gt;</code> which is <code>0</code> but i am getting error as </p>
  
  <pre><code>ORA-19228: XPST0008 - undeclared identifier: prefix 'ax2140' local-name 'ax2140:code'
  19228. 00000 -  "XPST0008 - undeclared identifier: prefix '%s' local-name '%s'"
  </code></pre>
  
  <p>Here is my xml string-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;soapenv:Body&gt;
        &lt;ns:placeShopOrderResponse xmlns:ns="http://service.soap.CDRator.com"&gt;
           &lt;ns:return xmlns:ax2127="http://data.soap.CDRator.com/xsd" 
           xmlns:ax2129="http://webshop.data.soap.CDRator.com/xsd" 
           xmlns:ax2130="http://core.data.soap.CDRator.com/xsd" 
           xmlns:ax2133="http://signup.data.soap.CDRator.com/xsd" 
           xmlns:ax2134="http://core.signup.data.soap.CDRator.com/xsd" 
           xmlns:ax2139="http://result.service.soap.CDRator.com/xsd" 
           xmlns:ax2140="http://core.result.service.soap.CDRator.com/xsd" 
           xmlns:ax2147="http://webshop.result.service.soap.CDRator.com/xsd" 
           xmlns:ax2148="http://mandate.result.service.soap.CDRator.com/xsd" 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax2147:PlaceShopOrderResultDTO"&gt;
              &lt;ax2130:id xsi:nil="true" /&gt;
              &lt;ax2140:code&gt;0&lt;/ax2140:code&gt;
              &lt;ax2140:description&gt;OK&lt;/ax2140:description&gt;
                 &lt;ax2127:statusId&gt;1&lt;/ax2127:statusId&gt;
                 &lt;ax2127:subscriptionCondition xsi:type="ax2127:SubscriptionStatusDTO"&gt;
                    &lt;ax2130:id xsi:nil="true" /&gt;
                    &lt;ax2140:code&gt;0&lt;/ax2140:code&gt;
                    &lt;ax2140:description&gt;OK&lt;/ax2140:description&gt;
                    &lt;ax2130:imsi xsi:nil="true" /&gt;
                    &lt;ax2130:phoneNumber&gt;NO_NUMBER&lt;/ax2130:phoneNumber&gt;
                    &lt;ax2127:imei xsi:nil="true" /&gt;
                    &lt;ax2127:simCard xsi:nil="true" /&gt;
                 &lt;/ax2127:teleService&gt;
              &lt;/ax2147:subscriptions&gt;
           &lt;/ns:return&gt;
        &lt;/ns:placeShopOrderResponse&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Here is my select query:</p>
  
  <pre><code>SELECT ID,xt_code.CODE
  FROM TEMP_SOAP_MONITORING_MSP sm
  CROSS JOIN XMLTable(XMLNAMESPACES (
        'http://core.result.service.soap.CDRator.com/xsd' as "ax2140_code"
      ),
      'for $i in //ax2140:code return $i'
      passing XMLType(sm.RESPONSE_XML)
      columns "CODE" VARCHAR2(50) path '/') xt_code;
  </code></pre>