Problem with namesapce Prefix in XSLT transform

Hi all,
I have the following XML as source:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\Documents and Settings\i034461\Desktop\TestConv.xslt"?>
<ns0:Proxy_Mail_MT xmlns:ns0="http://abhi.com">
     <Sender>A</Sender>
     <Receiver>B</Receiver>
     <Content>test</Content>
     <Content>test1</Content>
</ns0:Proxy_Mail_MT>
target:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
   <From>A</From>
   <To>B</To>
   <Content>*Hi    B       A    test       Thanks    A</Content>
</ns1:Mail>
I use a XSL transform to achieve the same.  The XSL file is
as
<?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml C:\Documents and Settings\i034461\Desktop\test.xml?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
     <xsl:template match="/">
          <ns1:Mail xmlns:ns1 = "http://sap.com/xi/XI/Mail/30">
               <From>
                    <xsl:value-of select="concat('hi' , '   ' , Proxy_Mail_MT/Sender)"/>
               </From>
               <To>
                    <xsl:value-of select="concat('Thanks' ,  '    ' , Proxy_Mail_MT/Receiver)"/>
               </To>
               <content>
               <xsl:for-each select="Proxy_Mail_MT/Content">
                <xsl:variable name="ConCnt" select="." />
                <xsl:value-of select="concat($ConCnt , '   ' )"/>                    
               </xsl:for-each>
               </content>
          </ns1:Mail>
     </xsl:template>
</xsl:stylesheet>
I face the Following issue:
My Source XML Root Document has a namespace Prefix
ns0:Proxy_Mail_MT
I would like to have my template match as  the root set as (/).
Unfortunately, the XPATH expression for the elements (  say Proxy_Mail_MT/Receiver ) fails beacuse of the NAMESPACE Prefix   "ns0".
Can anyone suggest me how this namespace prefix can be used in the XPATH expression  or is there any other possible solution.
Any help would be appreciated.
Regards
Abhishek

Hi,
you need to add the namespace to your header. It will look like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://abhi.com" exclude-result-prefixes="ns0">
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
     <xsl:template match="/">
          <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
               <From>
                    <xsl:value-of select="concat('hi' , ' ' , /ns0:Proxy_Mail_MT/Sender)"/>
Hope it helps
Kind regards
Mikkel

Similar Messages

  • Problem with master data lookup in transformations

    Hi,
    We're experiencing a strange problem in the transformations for an Error Reporting scenario.
    We've the SAP standard customer (0CUSTOMER) in DSO 2 which derives it's value from the navigational attribute of YCUSTNR (0CUSTOMER is the navigational attribute of YCUSTNR) in DSO1. But the problem here is that even when there is no entry for YCUSTNR, the 0CUSTOMER in DSO 2 returns a value.
    Referential Integrity check is not employed for this scenario. Is it because of this reason that lack of master data is returning some value held in memory. I'm not sure whether it's an issue with the cache. Is there any work around for solving this problem other than the standard master data look up?
    Any help in this issue would be appreciated and rewarded.
    Thanks & Regards
    Hari

    Note 1031553 - Reading master data returns value that does not exist
    will solve this problem.
    Regards,
    József.

  • Problem with Dynamic Configuration in XSLT mapping..!!

    Hi friends,
    Working first time with xslt map.I am doing a Idoc to File scenario in which I need to pass Idoc number as the file name dynamically. Right now I am just trying to send some constant value 'ABCD' to go in dynamic attribute filename.
    I used the code which has been provided over here.
    [http://help.sap.com/saphelp_nw04/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm]
    I just changed the "Directory" with "FileName" in the code. It is not generating the dynamic attribute http://sap.com/xi/XI/System/File
    This is my xsl code. Please suggest me If iam doing anything wrong.
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
         <xsl:output indent="no"/>
         *<xsl:param name="inputparam" select = "ABCD"/>*
         <xsl:output method="text" encoding="utf-8"/>
         <xsl:template match="/">
              <!-- change dynamic configuration -->
              <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"/>
              *<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File', 'FileName')"/>*
              <xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)"/>
              <xsl:variable name="new-value" select="concat($dynamic-value, 'subfolder\')"/>
              <xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
              <!-- copy payload -->
              <xsl:copy-of select="."/>
         </xsl:template>
         <xsl:template match="/">
    Waiting for your answers.
    Thank you.
    Deepthi.

    Hi Stefen,
    I tried the way you suggest but still I couldn't able to see the Dynamic Configuration attribute in SOAP document. I tried for Idoc number and even tried by passing just a value 'abcd' like below.
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
         <xsl:output indent="no"/>
         <xsl:output method="text" encoding="utf-8"/>
         *<xsl:param name="inputparam"/>*
                    *<xsl:param name="new-value">*
      *<xsl:value-of select="/WMMBID01/IDOC/EDI_DC40/DOCNUM" />*
      *</xsl:param>*     
         <xsl:template match="/">
              <!-- change dynamic configuration -->
              <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"/>
              <xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File', 'FileName')"/>
              <xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
         <xsl:output indent="no"/>
         <xsl:output method="text" encoding="utf-8"/>
         *<xsl:param name="inputparam"/>*
                    *<xsl:param name="new-value" select="abcd">*
       *</xsl:param>*     
         <xsl:template match="/">
              <!-- change dynamic configuration -->
              <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"/>
              <xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File', 'FileName')"/>
              <xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
    Any suggestions please.
    Thanks
    Deepthi.

  • Problem with namespace prefix

    Dear all,
    I'm using code generated by NW Developer Studio  2004s for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but ECC (ERP 6.0) doesn't like the namespace prefixes (the namespace was not recognised by the ECC mapping tool.)and throws back a DeliveryException.
    The SOAP message created by the generated NWDS code is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="urn:sap-com:document:sap:rfc:functions" xmlns:tns="urn:sap-com:document:sap:rfc:functions">
    - <SOAP-ENV:Body>
    - <wn4:Z_APPOINTMENT_GET_JCO_ORG>
      <wn4:DATE_FROM>2007.01.01</wn4:DATE_FROM>
      <wn4:DATE_TO>2008-02-02</wn4:DATE_TO>
      <wn4:USERID>EGREO</wn4:USERID>
      </wn4:Z_APPOINTMENT_GET_JCO_ORG>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    I've had a very good look around the generated code - the serializers for creating the soap request - but could not find what exactly might be changed to leave off the prefixes.
    I am using portal server 2004s
    Many thanks for any advice/help
    Reza

    I find out how should I do that.
    /Reza

  • Problem with JBuilder and javax.xml.transform package

    Hi,
    My JBuilder 7 can not find javax.xml.transform package. i use javax.xml.parsers package but i can not access to javax.xml.transform. is there a problem or something necessary to do to access that?
    Best Wishes - WiseWarrior

    Hey WiseWarrior,
    your problem is directly related to your jar file in run time. The xml parser jar which you are using to perform transfor is not having the appropriate classes, take the latest version of xalan it has transform package and put it into your class path, it will work.
    CheerS!!
    Sandeep Raikwar

  • Problem with return of javax.xml.transform.Source impl from webService

    I have a web services that needs to return an XML string to the calling client. If I return the XML as a String object it gets deserialized twice and the end result is no longer XML. My research indicates that I can return an implementation of javax.xml.transform.Source and this will cause SOAP to attach the XML string to the message rather than embed it (protecting it from deserialization). The following is the effective part of my method:
    public Source[] consumeTextMessage(String id) throws RemoteException {
    try {
    MessageConsumer mc = new MessageConsumer();
    String[] messages = mc.consumeTextMessage(id);
    StreamSource[] sources = new StreamSource[messages.length];
    for(int i = 0; i < messages.length; i++) {
    sources[ i ] = new StreamSource();
    return sources;
    } catch(RemoteException e) {
    throw e;
    note: the mc.consumeTextMessage(id) call works correctly and I know that I'm not putting anything in the StreamSource objects in the loop to build the array of StreamSource objects - just trying to get SOMETHING to work
    so this deploys without problem, but when I try to get a wsdl for the webservice i get a Server 500 error; the log says this:
    javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception javax.xml.transform.Source is an abstract class: cannot be instanciated
    ok.... if I change the method return type to a concrete class (StreamSource[]), redeploy and try to get a wsdl, I get this absolutely crazy error:
    javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception java.io.Reader is an abstract class: cannot be instanciated
    I have NO clue why it thinks it needs a Reader.
    If I change the method return type to String[] (and make the various adjustments to the method) then it deploys ok and gives me a good WSDL (though it still doesn't work because the Strings are deserialized twice so this isn't a viable solution but it does show that my webservice config is correct).
    So... bottom line seems to be that the webService "engine" of 10g AS doesn't like Source or StreamSource.....
    Any ideas what I can do??

    Funny story here: trying to deploy a different webserivce all together and got the same error message; thought I remembered seeing it before but wasn't sure; did a google search on it and lo and behold came across my first posting in this thread.... crazy.
    Anyway, I have discovered something that answers some of the questions I had in my first post: It seems that the argument types used in a webservice signature MUST be CONCRETE classes (and I would think primitives would work too though I don't remember trying them) - they can not be Interfaces or abstract classes. Probably if I read the webservices spec it would tell me that.
    So the error I was getting before was because Source was not a concrete class, and presumably the second error was caused by some signature somewhere along the line using the Reader abstract class.
    Fun stuff.

  • Problem with HTML code wich is transforming by RH

    Hello
    I would like to know if there is a way to stop the transformation that Robohelp does in the html code.
    For example:
    I write in the html editor :
    <div id="footer">
    bla bla bla
    </div>
    I go back to the Conception editor to work, then, when I go back to the html editor, the code became :
    <?rh-region_start id="footer" style="x-right: -1240px; x-bottom: -110px; " ?>
    bla bla bla
    <?rh-region_end ?>
    Is there a way to stop it ?
    Thanks

    Hi there
    I suspect what is happening is that you are trying to use the term "footer" to identify a div and because RoboHelp offers its own footer and header, these are "reserved" words that RoboHelp will insist on using.
    It's no different than what you encounter when scripting or programming.
    The only suggestion I can make is to perhaps use a variant on the name. Perhaps insert a zero for one or both of the letter o in footer so it looks like this: f00ter.
    Cheers... Rick

  • XSLT Mapping - problem with prefixes when calling template

    Hi all,
    I am having a problem with using an XSLT mapping in XI to combine various fields from 2 input messages of different structures into a single output message.  I understand that XI puts a wrapper around the 2 input messages so the structure of the XML I am mapping is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns2:Messages xmlns:ns2="http://sap.com/xi/XI/SplitAndMerge">
    <ns2:Message1>
    <ns:(root of first message)>
    </ns:(root of first message)>
    </ns2:Message1>
    <ns2:Message2>
    <ns:(root of second message)>
    </ns: (root of second message)>
    </ns2:Message2>
    </ns2:Messages>
    Currently my XSL looks like the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://example.co.uk/example" xmlns:ns2="http://sap.com/xi/XI/SplitAndMerge" xmlns:javamap="java:systemDate.CurrentDate" version="2.0">
    <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
    <xsl:param name="inputparam"/>
    <xsl:template match="ns2:Messages">
    ...<xsl:calltemplate name="FormattingTemplate"/>
    </xsl:template>
    <xsl:template name="FormattingTemplate">
    </xsl:template>
    </xsl:stylesheet>
    When I test the mapping it works fine until it calls the FormattingTemplate.  Then it throws out a "transformer exception" error saying the prefix 'ns2' is not mapped to a namespace.
    If anyone could tell me where I am going wrong I would be very grateful.
    Thanks,
    Mike

    Hi Udo,
    Thanks for your reply.
    When testing the stylesheet locally with XMLSpy, it works fine, but I have just noticed that it adds information in the root tag of the target message as follows:
    <(root of target message) xmlns:javamap="java:systemDate.CurrentDate" xmlns:ns="http://example.co.uk/example" xmlns:ns2="http://sap.com/xi/XI/SplitAndMerge">
    I checked the root tag of the target message in XI and it does not automatically add this information. Thus I added it in my stylesheet so the information above is projected in the target message, but the same error message appears when the call template function is called.  Do you know if I need to somehow add a namespace to templates other than the main one? If so, do you know how I go about doing that?
    Thanks,
    Mike

  • Problem with x:transform function : translation with XSLT

    I've got a problem with this code :
    This is the XML file :
    <%@taglib prefix="x" uri="http://java.sun.com/jstl/xml"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <c:import var="xslDoc" url="test.xsl"/>
    <x:transform  xslt ="${xslDoc}">
      <students>
      <student id="1">
       <name>
         <first>John</first>
         <last>Smith</last>
         <middle>T</middle>
       </name>
       <grade>
         <points>72</points>
         <letter>C</letter>
       </grade>
      </student>
    </students>
    </x:transform>This is the XSLT :
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="students">
      <html>
      <head>
      <title>XSLT Transform</title>
      </head>
      <body>
       <table border="1">
       <tr><th>First</th><th>Last</th>
    <th>Points</th><th>Letter</th></tr> 
       <xsl:apply-templates/>
       </table>
       </body>
      </html>
    </xsl:template>
    <xsl:template match="student">
      <tr>
       <td><xsl:value-of select="name/first"/></td>
       <td><xsl:value-of select="name/last"/></td>
       <td><xsl:value-of select="grade/points"/></td>
       <td><xsl:value-of select="grade/letter"/></td>
      </tr>
    </xsl:template>
    </xsl:stylesheet>I use NetBeans 3.5.1 for compiling and testing, and on my machine all works fine.
    But when i upload the code on the server i''ve this type of error :
    HTTP Status 500 - Internal Server Error
    exception
    org.apache.jasper.JasperException: access denied (java.util.PropertyPermission org.xml.sax.driver read)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    java.security.AccessControlException: access denied (java.util.PropertyPermission org.xml.sax.driver read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)
         at java.lang.System.getProperty(System.java:572)
         at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:81)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.getSource(TransformSupport.java:280)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.getSource(TransformSupport.java:276)
         at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:159)
         at org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(TransformTag.java:104)
         at org.apache.jsp.test_jsp._jspService(test_jsp.java:78)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:457)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
         at java.lang.Thread.run(Thread.java:536)
    org.apache.jasper.JasperException: access denied (java.util.PropertyPermission org.xml.sax.driver read)It seems a permission problem, but my experience with JSP is very poor , i've asked to control to my host
    the policy of the folders but they didn't respond me yet.
    Any suggestion ?
    Thx for reading, and sorry for my rusty english :-P

    Thanks.
    I've already tried to insert the whole path. You mean this,right ?
    <c:import var="xslDoc" url="http://www.domain.net/examples/test.xsl"/>I've searched a lot with google but i haven't find anything.
    I've not searched a lot into the jakarta site, I'll do tomorrow, now it's
    a bit late (1:45 AM in Italy :-0 ), so i think that i'll go to sleep.
    Thanks for responding so soon!
    I'll wait for your new infos.
    Thanks again.
    read you tomorrow.

  • Problem with XSLT Transformation on BPM

    Hi there,
    I have a 1:N File --> Idocs Scenario with BPM, Inside the BPM i have an XSLT Transformation that has a problem i cant figure out, basically this XSLT Groups the file structure like this:
    <File>                                                *                  <Shipments>
       <Route>                                         *                     <Route>
          <Id>1</Id>                                   *                         <Id>1</Id>
          <delivery>1</delivery>               *                         <delivery>1</delivery>
       </Route>                                        *                         <delivery>2</delivery>
      <Route>                                          *                     </Route>
          <Id>1</Id>                                   *                     <Route>
          <delivery>2</delivery>               *                         <Id>2</Id>
       </Route>                                        *                         <delivery>3</delivery>
      <Route>                                          *                         <delivery>4</delivery>
          <Id>2</Id>                                   *                      </Route>
          <delivery>3</delivery>               *                   </Shipments>
       </Route>                                        *
       <Route>                                         *
          <Id>2</Id>                                   *
          <delivery>4</delivery>               *
       </Route>                                        *
    </File>                                               *
    It's supposed to generate 1 Route Segment for each disctint Route Id on the Source file, it has always worked fine as we ran several tests before going into production system, but now, sometimes it misses a few routes for example the output will be 25 different Routes for a source file that 28, or 2 routes from a file that as 3.
    I have tested the XSLT on the repository and it works fine all the time, same thing when using xml spy, i always download the payload i get from the file adapter, i got a source file from PRD that has 28 routes and i ran the whole scenario on QAS and it generated 12 routes only, im about to open an OSS message but first i wanted to know if anyone has seen something like this, thanks in advance for all the help you guys can provide.
    Best Regards,
    Roberto.
    p.s. i can send the XSL if needed or anything just ask for it.

    Hi,
    Basically because i  have to do 2 transformations, first i run the XSLT to group all the deliveries and such, and then i do a graphic mapping to split it into single Shipment Idocs, i dont know how to group by id on graphical mapping..., anyway i don't think the fact that im using BPM would finally alter the xslt result,
    Regards,
    Roberto.

  • Problems with xml transformation via xslt - strange results

    hi everybody...
    i've little trouble finalling a little tool programmed by myself for my education.
    the application contains a kind of document-server which enables the client to up- and download xml-document in a special format to/from the server.
    in case of the xml-dtd of client and server are different (same type of content, different dtd) the server implements a method called transform(StreamSource source, StreamSource xsl_stylesheet, StreamResult result) which contains the following code:
        transform(StreamSource source, StreamSource xml_stylesheet, StreamResult result) {
          try {
            TransformerFactory factory = TransformerFactory.newInstance();
            Templates template = factory.newTemplates(xsl_stylesheet);
            Transformer transformer = template.newTransformer();
            transformer.transform(source, result);
            return true;
          catch(Exception e) {
            return false;
        }the method is called by the methods downloadFile(...) and uploadFile(...) which both generate the different StreamSource- and StreamResult-Objects.
    by using the downloadFile(...) method, the requested file is transformed, stored temporary in a tmp-directory, read in and send to the requesting client.
    by using the uploadFile(...) method, the sent file is stored temporary in the tmp-directory, read in, transformed and stored as new server-document (if the file still exists it will be overwritten).
    My Problem:
    the result files generated by transform(SreamSource source, StreamSource xsl_stylesheet, StreamResult result) look strange. That means the result xml-code is not equal to the result xml-code i generated by transforming my xml-documents with saxon.
    The xsl files are correct and the xml files are wellformed as well as they are valid.
    The result files look like this:
    <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?>
       XYZ
       ABC
          1
          piece
          One piece of ABC(-> <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?> is a "string" of code from the source xml-file...)
    The result should look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE a-resource SYSTEM "../dtd/A.dtd">
    <a-resource id="XYZ">
       <a-type>ABC</a-type>
       <a-data>
          <a-value>1</a-value>
          <a-unit>piece</a-unit>
          <a-descr>One piece of ABC</a-descr>
       </a-data>
    </a-resource>Is there anyone who knows what kind of mistake i did in my transform(...) method??
    Do I need to add some attributes to any of the Objects of Template of Transformer??
    please... help me
    i've been testing now over two nights long but couldn't find any solution how to bring my application to work "correct".
    thanks,
    Thof!!!

    ok...
    i got it!
    seems like jaxpi is unable to convert files with extensions different to .xml ...
    now it's working

  • XSLT Problem with soap namespace

    Hi there,
    I have a problem transforming an XML doc with soap elements, using XSLT (Xalan).
    Here's the input:
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.ean.nl">
      <testthis>123456</testthis>
    </soap:Envelope>and here's the XSL:
    <?xml version="1.0"?>
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>I expect to get something like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01>123456<H01>
    <Orders>But instead I get:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01/>
    </Orders>I've tried a lot of things and I'm probably overseeing something stupid, but I'm stuck.
    It seems as if anything without soap: namespace cannot be processed by my XSL (when I add it in the input XML and XSL it works).
    Any help would be greatly appreciated.
    Greetings,
    Erik

    Yes, I found it!
    The following XSL for the same XML doc works!
    <?xml version="1.0"?>
    <xsl:transform xmlns:ean="http://www.ean.nl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="ean:testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>Thanks, you pointed me in the right direction :-)
    Erik

  • XSLT Transformation problem

    Hi,
    hope anybody can help.
    I try to transform a object to another object via XSLT transformation.
    Here is my coding :
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_export TYPE abap_trans_resbind_tab,
            wa_export TYPE abap_trans_resbind.
      DATA: obj_data TYPE REF TO data.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
    * Create table with internal structure
      CREATE DATA e_data TYPE (wa_transformation-structure_name).
      wa_import-name = 'IMPORT'.
      GET REFERENCE OF i_data INTO wa_import-value.
      APPEND wa_import TO obj_import.
    * Call transformation
      CALL TRANSFORMATION (wa_transformation-transformation)
      SOURCE (obj_import)
      RESULT (obj_export).
    i_data is a import parameter from type "ref to data".
    My problem is, that "Call transformation" makes a shortdump when calling them.
    Regards,
    Anton

    Found a solution for my problem. Now it works!
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_data TYPE REF TO data.
      DATA: wa_return TYPE bapiret2.
      FIELD-SYMBOLS: <data> TYPE ANY TABLE.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
      IF sy-subrc IS INITIAL.
    * Create table with internal structure
        CREATE DATA e_data TYPE STANDARD TABLE OF (wa_transformation-structure_name).
        ASSIGN i_data->* TO <data>.
        wa_import-name = 'IMPORT'.
        GET REFERENCE OF <data> INTO wa_import-value.
        APPEND wa_import TO obj_import.
    * Call transformation
        CALL TRANSFORMATION (wa_transformation-transformation)
        SOURCE (obj_import)
        RESULT export_data = e_data.
      ELSE.
        MOVE:  'Y0_DPL' TO wa_return-id,
               'E'      TO wa_return-type,
               '108'    TO wa_return-number.
        APPEND wa_return TO e_return.
        CLEAR: wa_return.
      ENDIF.

  • Problems with transforming special characters

    Hi,
    I develop a small educational application ( http://sourceforge.net/projects/pauker/ ). I work with JDK-1.4.0 on Mandrake Linux 8.2. At first I used serialized objects to save the lessons to a file. This worked well until I wanted to change some public members of the involved classes. That's why I switched over to the new and shiny XML. Now I have a different problem!
    Pauker saves its lessons in gziped XML files. Users from all over the world can create lessons containing very different characters. There are European characters like ������� and asian characters. Loading this lessons on a system with a different encoding works fine. Saving such a lesson on a system with a different encoding can destroy the lesson.
    Example:
    On a german system a user creates a lesson with the letter � on a card side and saves it. A different user working on an english system loads this lesson. The character "�" is displayed correctly. The english user saves the lesson. The character "�" will be replaced by a question mark in the xml file. Next time the english user loads the lesson she will not see "�" but "?" on the display.
    Here is a little example program that does the transformation in exactly the way Pauker does. Please test it out.
    import java.io.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.*;
    public class XMLTest {
    public XMLTest() {
    try {
    // create document
    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
    Document document = documentBuilder.newDocument();
    // fill document
    Element element = document.createElement("Element");
    document.appendChild(element);
    element.appendChild(document.createTextNode("�������"));
    // transform to XML
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    //transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    DOMSource source = new DOMSource(document);
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    StreamResult result = new StreamResult(outputStream);
    transformer.transform(source, result);
    System.out.println("original: �������");
    System.out.println(outputStream.toString());
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println();
    public static void main(String[] args) {
    new XMLTest();
    So what do I have to do to fix this problem? I have a lot of new features waiting in the CVS but this bug is still open and discussed. I dont want to release a new version with such a gaping hole in it...
    Thanks a lot!
    If you prefer to reply peronally, please use Ronny.Standtke at gmx.de

    I don't see how you can say that there's a problem with saving your XML files when the code you post doesn't actually save it to a file. Your transform is being written to a ByteArrayOutputStream, which isn't used except for this statement which I assume is for debugging:System.out.println(outputStream.toString());Of course that is useless for debugging the problem you describe, for two reasons:
    1. the toString() method uses your system's default encoding, which may be ISO-8859-1 but is definitely not UTF-8. You could write toString("UTF-8") but that is a waste of time because:
    2. You use System.out.println() to examine the data, which writes it to a console that also probably does not use UTF-8. I don't know what encoding it does use, but UTF-8 is unlikely.
    So, save your files using the UTF-8 encoding as robadmin suggested. And to test the result, make sure you use a tool that understands the UTF-8 encoding.

  • Problem with CALL TRANSFORMATION xml - abap

    Hello!
    I got the following problems using call transformation to read a xml-file to local abap datatype!
    Simple xml file for testing:
    <BMECAT>
    <HEADER>
    asdf
    </HEADER>
    </BMECAT>
    XSLT file:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <xsl:value-of select="./BMECAT/HEADER"/>
      </xsl:template>
    </xsl:transform>
    The xslt transformation works with xslt-tester!
    My Source:
    DATA: xmlupl TYPE string,
    outputx TYPE XSTRING,
    lv_string TYPE string.
    * in xmlupl my xml import is stored
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    EXPORTING
    text = xmlupl " variable type string
    IMPORTING
    buffer = outputx. " variable type xstring
    TRY .
         CALL TRANSFORMATION path_to_xslt_file
           SOURCE XML outputx
         RESULT HEADER = lv_string.
    CATCH cx_xslt_exception INTO xslt_error.
         data: xslt_message type string .
         xslt_message = xslt_error->get_text( ).
    ENDTRY.
    After debugging in xslt_message is stored the following text:
    "The element abap was expected for the XML-ABAP transformation"
    Can anyone help me with this problem?
    Regards,
    Daniel

    hi
    good
    try this code
    Just look at this piece of code, I think it should help you.
      DATA : ITAB   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB[] ).
    DATA IS CONVERTED TO XML; DISPLAY THE XML-DOCUMENT
      CALL METHOD L_XML->DISPLAY.
    thanks
    mrutyun^

Maybe you are looking for

  • Officejet 8620, fail to print, windows 8.1 (upgraded from windows 8)

    I have spent many hours trying to resolve an issue on a Dell Vostro laptop, that was upgraded from Windows 8 pro to Windows 8.1 pro and has the latest updates installed. When printing, the print is delivered to the print spooler, it is there momentar

  • Using Frame API for C, Need to change Data size for a TX Object

    I need to Transmit different messages to the same ArbitrationID address. The Transmited messages have variable lengths. Can I call ncConfig on an object to change the NC_ATTR_CAN_DATA_LENGTH even after the call to ncOpenObject. Or do I have to Close

  • Need help with port mapping on Airport Utility 6.1

    Ive been trying to port map on my TC with Airport Utility 6.1 and failing miserably. Port still closed. Can anyone advise where Im going wrong? Am trying to set up my home camera to be viewed outside. I managed to key in the ports etc under Network a

  • Need information on dbms_smtp

    Hi I got a requirement from office..that I need to send mails to customers. The customer who is reaching policy expire date, I have to send a mail to him/her. Seniors are given me this task. I have to complete this. I am new to his task. Please help

  • How to sandbox flash player in Safari

    I have read that Safari for OS X Mavericks has a new sandboxing feature to firewall Adobe's Flash player. Does anyone know about this and if so, how is this app obtained and applied? Thanks