cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with namespace.

former_member373665
Participant
0 Kudos

HI experts!

I have a doubt about XSLT. I'm trying get via XPATH to value of the tag <Nombre> but I don't know how can I do it.

I'm tryng acces with this XPTAH:


<xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;C&apos; and ./@id=&apos;atom1&apos;]/*/Table1/Nombre">

but it's impossible.

I also tried with code:


<xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;C&apos; and  ./@id=&apos;atom1&apos;]/DescargarFicheroPendienteResponse/DescargarFicheroPendienteResult/NewDataSetTable1/Nombre">

My problem is the tag:

<DescargarFicheroPendienteResponse xmlns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  1. <Payload Role="C" id="atom1" statusNo="0" statusMsg="success" reference="atom2" payload="atom2" calltype="solicit response (call/reply)" adapter="WSAS"> 
  2.     <http.header> 
  3.         <http.header.info id="X-AspNet-Version" value="2.0.50727"/> 
  4.         <http.header.info id="Date" value="Wed, 24 Jul 2013 10:23:53 GMT"/> 
  5.         <http.header.info id="Content-Length" value="494"/> 
  6.         <http.header.info id="MicrosoftOfficeWebServer" value="5.0_Pub"/> 
  7.         <http.header.info id="Content-Type" value="text/xml; charset=utf-8"/> 
  8.         <http.header.info id="Server" value="Microsoft-IIS/6.0"/> 
  9.         <http.header.info id="X-Powered-By" value="ASP.NET"/> 
  10.         <http.header.info id="Cache-Control" value="private, max-age=0"/> 
  11.     </http.header> 
  12.     <DescargarFicheroPendienteResponse xmlns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
  13.         <DescargarFicheroPendienteResult> 
  14.             <NewDataSet xmlns=""> 
  15.                 <Table1> 
  16.                     <Nombre>0</Nombre> 
  17.                     <Contenido/> 
  18.                 </Table1> 
  19.             </NewDataSet> 
  20.         </DescargarFicheroPendienteResult> 
  21.     </DescargarFicheroPendienteResponse> 
  22. </Payload> 

I think my problem is about the namespace xmlns="http://tempuri.org/", but I don't know how can I solve it.

I have read I have to add the namespace into  stylesheet

  1. <xsl:stylesheet xmlns:b1e="urn:com.sap.b1i.sim:b1event" 
  2. xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent"  
  3. xmlns:b1im="urn:com.sap.b1i.sim:b1imessage"  
  4. xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms"  
  5. xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter"  
  6. xmlns:rfc="urn:sap-com:document:sap:rfc:functions"  
  7. xmlns:sim="urn:com.sap.b1i.sim:entity"  
  8. xmlns:utils2="com.sap.b1i.bpc_tools.Utilities"  
  9. xmlns:vpf="urn:com.sap.b1i.vplatform:entity"  
  10. xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc"  
  11. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
  12. xmlns:po="http://tempuri.org/"  
  13. ..............

I Add   -->   xmlns:po="http://tempuri.org/"


but when test the step occurs an error:

com.sap.b1i.utilities.UtilException: UTE001 Nested exception: javax.xml.transform.TransformerConfigurationException: Could not load stylesheet.com.sap.engine.lib.xml.util.NestedException: Prefix not mapped: po -> java.lang.Exception: XMLParser: Prefix 'po' is not mapped to a namespace

Anyone can help me??

Thanks.


Accepted Solutions (1)

Accepted Solutions (1)

bastian_schaefer
Active Contributor
0 Kudos
Hi,
you can ignore namespaces with following statement:
/*[local-name()=&apos;namdeofyourxmltag&apos;]
Please check in following thread:
Best regards
Bastian
former_member373665
Participant
0 Kudos

thank you very much

Answers (0)