XSLT problem

Hi all,
I want to copy the field content using the value-of statement and changing the namespace, the schema location. I donu2019t know how to do it, I googled and I tried some ideas but w/o success.
Input XML
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_RFCbusquedaDun xmlns:ns1="http://xxxx.com/fscm/ea">
<Agencia>DNB</Agencia>
<requestType>
  <NombreEmpresa>Ricardo</NombreEmpresa>
  u2026
Here is the xsl I am working on:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
  <xsl:strip-space elements="*"/>
  <xsl:template match="/">
    <ns1:Z_FSCM_BUSQUEDA_DUN xmlns:ns1="http://cepsa.com/fscm/ea">
      <E_XML>
        <xsl:value-of select="ns1:BusquedaIdProductosResponse"/>
      </E_XML>
    </ns1:Z_FSCM_BUSQUEDA_DUN>
  </xsl:template>
</xsl:transform>
Output XML
<?xml version="1.0" encoding="utf-8" ?>
<ns1:Z_FSCM_BUSQUEDA_DUN xmlns:ns1="http://cepsa.com/fscm/ea">
  <E_XML>text </E_XML>
If you see the mapping is retrieving the source namespace and the objective is to create a new one.
Guys, the idea behind this is to put working a sync interface SOAP -> RFC with an XSL mapping and to call properly this RFC I believe that this namespace should be replaced by urn:sap-com:document:sap:rfc:functions. With the above namespace I can do the mapping of course and at sxi_monitor everything looks fine, but at AE Iu2019m getting the following error: Error in processing caused by: com.sap.aii.af.rfc.core.server.RfcServerException: got unexpected document type:DOC_TYPE_UNKNOWN, and I believe that is due to wrong namespace.
Anyone knows how to change the namespace in a XSL mapping or any other idea to fix this problem with RFC call.
Thanks in advance,
Ricardo.

Hi Emiliano,
Thanks for the tip, but I tried this beforehand; this is a sync call and I think it is not possible to do what you said, just have a look:
1 step) soap request --> XSL --> soap request
2 step) soap request --> Graph.Mapping --> RFC parameters.
..as this is a sync call, the same structure(RFC) that is used to call the web service should be the same at time that receives the response, like this:
1 step) RFC --> XSL --> soap request
2 step) soap request --> Graph.Mapping --> RFC parameters
and it doesn't work with this approach!
@Kumar - the same apply for your great tip, the change must be done at sender RFC adapter and with XMLAnonymizerBean Iu2019m not able to change only the namespace at response as I wish. With this I change the request and response and I donu2019t want to change the namespace at request because it fails at web service call.
Any ideas?
Thanks,
Ricardo
Edited by: Ricardo  Quintino on Jun 10, 2008 3:44 PM

Similar Messages

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • 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

  • Styling XML with XSLT Problem with javax.xml.transform???

    I have been trying to make a transformation and seem to be having a problem in that javax.xml.transform can not be found while using jdk1.3....If I use jdk1.4, there is no problem....
    Does anyone know how I can get things to work using jdk1.3???
    (Description of what I am doing...1) Building XML Source 2) Setting up the XSLT File 3) Building Source Object 4) Build Result Object 5) Transforming the Data.....MY RESULT SHOULD BE AN HTML PAGE)
    I have tried putting xerces.jar and xalan.jar in my CLASSPATH....but this still doesn't work....onyl thing that has worked is using jdk1.4 as my JAVA_HOME....
    PLEASE HELP!!!!

    PLEASE HELP....your advice here would be greatly appreciated.....

  • XSLT problem with img tag in Saxon

    Hi,
    Iam getting a problem with <img> tag when transforming a document using Saxon transformer. In the input XSLT I have proper closing tag for <img>, but the output of the transformation is not well formed as the closing tag for <img> does not appear. I need to feed the output to a FO object to generate a print preview, but the output is not well-formed.
    Kindly help to resolve the issue.
    Kind Regards,
    Abhinandan

    Perhaps that is because you are generating HTML as your output? As I recall, <img> tags don't have to be closed in HTML. So try generating XML instead if you need XML.

  • XML/XSLT problem

    I'm currently reading info on using XSLT with XML documents ("Java Server Programming" by WROX), but I'm having quite a few problems getting anything to work. Can someone point me to a page/document that simply explains what .jar files to install, where to get them and where to place them to enable parsing XML files and using XSLT? I'm running jdk1.3.1_02.
    Thank You
    Tom Berry

    - download: http://java.sun.com/xml/downloads/javaxmlpack.html
    - install JAXP
    - follow the XSLT tutorial: http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPXSLT.html
    - have fun!

  • XSLT-problem with sequence attributes

    Hi,
    in my XSLT-program (i'm a real newbie!) i'm adding dynamically attributes and their values to a tag, by using the following code :
    <SUPPLIER>
      <xsl:attribute name="FUNLOC">
        <xsl:value-of select="SUPPLIER_FUNLOC" />
      </xsl:attribute>
      <xsl:attribute name="NAME">
        <xsl:value-of select="SUPPLIER_NAME" />
      </xsl:attribute>
      <xsl:attribute name="LOCATION">
        <xsl:value-of select="SUPPLIER_LOCATION" />
      </xsl:attribute>
      </SUPPLIER>
    The problem is that the attributes in the resulting xml-file are alphabetically ordered. For instance :
    <SUPPLIER FUNLOC="9522222" LOCATION="NL" NAME="Test vendor VMOI">
    How can i arrange that the result of the xml-file is a sequence of entrance is taken, so
    <SUPPLIER FUNLOC="9522222" NAME="Test vendor VMOI" LOCATION="NL" >
    regards,
    Hans
    [email protected]

    Hi Hans,
    I think you're using ABAP-XSLT?!
    If you do so, you can solve the sorting problem by using a 1:1 Message mapping after the ABAP-XSLT mapping. This resolves the problem that the nodes are not in the correct order.
    In your interface mapping you have to configure 2 mappings:
    1: ABAP-XSLT
    2: Message mapping.
    Of course this means that the total processing time increases a little bit.
    I had the same problem with the sequence of my (ACC_DOCUMENT) idoc nodes, the ABAP-XSLT screwed up the idoc, but the 1:1 message mapping solved the problem.
    Regards,
    Mark

  • XSLT problem when switching to JDK 1.4

    Hi,
    I have used Xalan for transforming XML into HTML under JDK 1.3.1 but when I switch to 1.4.1 I get problems with attributes in the HTML part of my XSL file. I know that Xalan is included in 1.4 and apparently something has changed...
    Java code ---------------------------------------------------------------:
    System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    String xmlFile = "C:/<<path>>/test.xml";
    String xslFile = "C:/<<path>>/test.xsl";
    String htmlFile = "C:/<<path>>/test.html";
    StreamSource xmlSource = new StreamSource(xmlFile);
    StreamSource xsltSource = new StreamSource(xslFile);
    StreamResult htmlResult = new StreamResult(new BufferedOutputStream(new FileOutputStream(htmlFile)));
    // Get a XSLT transformer
    Transformer transformer = tFactory.newTransformer(xsltSource);
    // Do the transform
    transformer.transform(xmlSource, htmlResult);
    XSL code ---------------------------------------------------------------:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <body>
    <table>
    <tr><td>some text</td></tr>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    If I add any attribute to the HTML part of the XSL file I get a fat stack trace.
    Changing to (added a "bgcolor" attribute):
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <body bgcolor="#0000FF">
    <table>
    <tr><td>some text</td></tr>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    will give me:
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:767)
         at se.carmen.db.XsltTransform14.main(XsltTransform14.java:32)
    Caused by: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:946)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
         ... 1 more
    Caused by: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:942)
         ... 2 more
    Caused by: java.lang.NullPointerException
         at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:987)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
         ... 2 more
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:946)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
         at se.carmen.db.XsltTransform14.main(XsltTransform14.java:32)
    Caused by: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:942)
         ... 2 more
    Caused by: java.lang.NullPointerException
         at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:987)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
         ... 2 more
    etc...
    java.lang.NullPointerException
         at org.apache.xalan.processor.XSLTElementDef.getAttributeDef(XSLTElementDef.java:624)
         at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:352)
         at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
         at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:315)
         at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:656)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:342)
         at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:401)
         at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:809)
         at org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.java:556)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:2678)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:782)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:328)
         at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:479)
         at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:521)
         at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:972)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
         at se.carmen.db.XsltTransform14.main(XsltTransform14.java:32)
         Anyone got any ideas??

    I took a look in the release notes for the version of JAXP that I had previously downloaded and used with JDK 1.3:
    Specification Version: 1.2
    Reference Implementation (RI) Version: 1.2.0-EA1
    I could also find this information:
    Version 1.4 of the Java Platform
    To use this version of the Java XML release with version 1.4 of the Java platform, you must place them in
    <platformLocation>/jre/lib/endorsed
    They must exist in this location to override earlier versions of the Xalan libaries that are a standard part of the 1.4 platform. Because of that special requirement, it is not possible to specify these libraries using the -classpath option on the java/javac command line.
    Putting my xalan.jar (and xerces.jar) in a new folder named "endorsed" as specified actually made it work!
    I still have one question... Is there another way to specify the new version of xalan without putting it in this folder, I do not have control over the target platform and it would be better to use some kind of JVM setting if there is one?

  • XSLT problem (very strange problem)

    I am working on TRANSFORM activity. The schema of element that is giving problem in destination schema is ...
    <xs:element name="CustomInformation">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ColumnValue" minOccurs="0" maxOccurs="unbounded">
    <xs:complexType mixed="true">
    <xs:sequence>
    <xs:element name="Value" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Documents" type="DocumentsType" minOccurs="0"/>
    <xs:element name="tsvData" type="tsvType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="instance" type="InstanceType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    I want output like this...
    <ns1:CustomInformation>
    <ns1:ColumnValue name="client_name">value of source field</ns1:ColumnValue>
    <ns1:ColumnValue name="fa_sales_owner">value of source field</ns1:ColumnValue>
    </ns1:CustomInformation>
    I am trying this code in TRANSFORM source code...
    <ns1:CustomInformation>
    <ns1:ColumnValue>
    <xsl:attribute name="name">
    <xsl:text disable-output-escaping="no">client_name</xsl:text>
    </xsl:attribute>
    <xsl:text disable-output-escaping="no">*<xsl:value-of select="/ns0:SfOpportunityIntfCollection/ns0:SfOpportunityIntf/ns0:accountName"/>*</xsl:text>
    </ns1:ColumnValue>
    <ns1:ColumnValue>
    <xsl:attribute name="name">
    <xsl:text disable-output-escaping="no">fa_sales_owner</xsl:text>
    </xsl:attribute>
    <xsl:text disable-output-escaping="no">*<xsl:value-of select="/ns0:SfOpportunityIntfCollection/ns0:SfOpportunityIntf/ns0:clientExecutive"/>*</xsl:text>
    </ns1:ColumnValue>
    </ns1:CustomInformation>
    against this xml...
    <SfOpportunityIntfCollection xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/iSalesAdapter">
    <SfOpportunityIntf>
    <accountId>3</accountId>
    <accountName>4</accountName>
    <clientExecutive>15</clientExecutive>
    <recordType>16</recordType>
    </SfOpportunityIntf>
    </SfOpportunityIntfCollection>
    But the element 'ColumnValue' is coming blank(tag <xsl:value-of> is not working). while the same statement is working out of <customInformation> element!!!
    Can anybody help me?

    Thanks for the link.
    I created a seperate project for xslt but still the same problem. But when I tried with removing <xsl:text disable-output-escaping="no">, it worked. Very strage, but yet don't know what was the problem :) If you know then please let me know.
    Can you help me in other queries too...
    1. In my Empty BPEL process I am receiving data through db partnerlink (through polling) and I am converting it through Transform activity. This time I am only validating my xslt through GUI only. At runtime what xml will be generated, how I can see it? Is there any way to output/log it?
    2. I want one more help from you. In xslt code, I need to put some transformation logic eg. if-else according to the specific value, check for null, blank values etc. Somewhere I read that I can do all this validation in java code also. What will be comfortable?
    3. In output xml, I want to remove the xml declaration as well as namespace declaration for 'ns1' and all prefixed 'ns1' from all element. Is that possible in the same transform process? like this...
    *<NikuDataBus>*
    *<Projects>*
    *<Project name="2" projectID="1" description="13" start="2009-08-04T16:02:23.390" finish="2009-08-04T16:02:23.390">*
    *<CustomInformation>*
    *<ColumnValue name="client_name">4</ns1:ColumnValue>*
    *<ColumnValue name="fa_sales_owner">15</ns1:ColumnValue>*
    *</CustomInformation>*
    *</Project>*
    *</NikuDataBus>*
    Please reply for my all queries.
    Edited by: vicky_007 on Aug 4, 2009 4:49 PM

  • XSLT problem -- urgent

    Hi,
    We are porting our application from WLS5.1 to WLS6.0SP2. We
    use Apache's Xerces parser for XSLT processing. After starting the server while
    loading a page, I get the following error:
    javax.xml.transform.TransformerException
    at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1242)
    at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
    at java.lang.Thread.run(Thread.java:484)
    java.lang.ArrayIndexOutOfBoundsException
    at org.apache.xalan.serialize.SerializerToXML.accum(SerializerToXML.java:1321)
    at org.apache.xalan.serialize.SerializerToXML.outputLineSep(SerializerToXML.java:195)
    at org.apache.xalan.serialize.SerializerToXML.indent(SerializerToXML.java:2241)
    at org.apache.xalan.serialize.SerializerToHTML.startElement(SerializerToHTML.java:559)
    at org.apache.xalan.transformer.QueuedStartElement.flush(QueuedStartElement.java:357)
    at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:770)
    at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:279)
    at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:749)
    at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:498)
    at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
    at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2085)
    at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1219)
    at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
    at java.lang.Thread.run(Thread.java:484)
    Has anyone come across this problem and got the solution ?
    Regards,
    Ramkumar

    This is correct you can use different 3rd party parsers like crimson or xml4j , by
    configuring the xml registry .However using different versions of apache xerces and xalan
    other than those shipped can cause compatibility problems and is not supported.
    Look at the faq url for details.
    http//e-docs.bea.com/wls/docs61/faq/xml.html#740643
    It might be possible however to hack this and get it to work.
    yeshwant
    Simon Spruzen wrote :
    If at all possible, you should limit your versions of Xalan and Xerces to those
    shipped with WLS (in weblogic.jar and xmlx.jar). So your imports look something
    like:
    import org.w3c.dom.*;
    import weblogic.apache.*; // not org.apache.*
    It seems that different versions of Xalan and Xerces ship with different versions
    of the org.w3c.dom classes that can be incompatible. You also must also use compatible
    versions of Xalan and Xerces together, else all sorts of oddness starts.
    (I wish Jakarta would merge the Xalan and Xerces packages into one super-package
    and gave it a single name)
    If you use the stuff shipped with WLS6.0 and nothing else, everything works fine.
    You don't have to use the registry and JAXP if you don't want to, however it's
    a nice clean API, providing you agree on what versions of Xalan and Xerces you're
    on. I found using JAXP with mixed versions of Xalan/Xerces just made things more
    confusing!
    WLS6.1 upgrades Xalan and Xerces and drops xmlx.jar. Here's part of a reply from
    a support case I've raised in a related area that clears things up:
    [Helen - BEA Support - writes:]
    "Here is some information that I hope will clarify things a little more :-
    The packaging was intended to make sure that customers could use newer versions
    of xerces and xalan without causing problems for the built in parser.The org.apache
    classes are packaged in xmlx.jar whereas the weblogic.apache classes are packaged
    in weblogic.jar.
    Originally, we planned to rev the xmlx.jar version of Xerces more often than
    the built-in version in WLS. But it turned out that there were compatibility
    problems involving the Level 2 DOM classes (org.w3c.dom package), so in
    practice people couldn't easily plug in a different version of Xerces than
    the one included in weblogic.jar. This problem generally only affects
    customers desiring to plug in a different version of Xerces;
    Because of the compatibility issue, which is not easily solvable, we have
    decided not to support plugging in a different version of Xerces than the one
    shipped. Therefore, we have decided to axe xmlx.jar.
    Note that for 6.1 it is not possible to use a different version of xerces and
    xalan than what is shipped as per
    http//e-docs.bea.com/wls/docs61/faq/xml.html#740643"
    "Ram Kumar" <[email protected]> wrote:
    Hi Kenneth,
    Yes, it is already in my classpath before weblogic.jar.
    Do I need to use the XML Registry and JAXP API for this to work compulsorily
    Regards,
    Ramkumar
    "Kenneth Chenis" <[email protected]> wrote:
    Try putting your xerces.jar file in the classpath before the weblogic.jar
    .... that resolved some (not all) of the problems we had with the internal
    xerces/parser classes in the weblogic.jar file.
    hope this helps,
    Kenneth Chenis
    ComponenTree Inc.
    Data Code Inc.
    [email protected]
    978-521-5970
    "Ram Kumar" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We are porting our application from WLS5.1 to WLS6.0SP2. We
    use Apache's Xerces parser for XSLT processing. After starting theserver
    while
    loading a page, I get the following error:
    javax.xml.transform.TransformerException
    atorg.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1242)
    atorg.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
    at java.lang.Thread.run(Thread.java:484)
    java.lang.ArrayIndexOutOfBoundsException
    atorg.apache.xalan.serialize.SerializerToXML.accum(SerializerToXML.java:1321)
    atorg.apache.xalan.serialize.SerializerToXML.outputLineSep(SerializerToXML.jav
    a:195)
    atorg.apache.xalan.serialize.SerializerToXML.indent(SerializerToXML.java:2241)
    atorg.apache.xalan.serialize.SerializerToHTML.startElement(SerializerToHTML.ja
    va:559)
    atorg.apache.xalan.transformer.QueuedStartElement.flush(QueuedStartElement.jav
    a:357)
    atorg.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle
    r.java:770)
    atorg.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.
    java:279)
    atorg.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
    749)
    atorg.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
    va:498)
    atorg.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
    a:193)
    atorg.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
    erImpl.java:2202)
    atorg.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
    Impl.java:2085)
    atorg.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1219)
    atorg.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
    at java.lang.Thread.run(Thread.java:484)
    Has anyone come across this problem and got the solution ?
    Regards,
    Ramkumar

  • XSLT problem passing raw XML

    Hello,
    I've a problem passing a piece of raw XML code to an external assembly to do some tasks.
    The problem is that if I use an XSLT like this:
    <xsl:template name="xml-to-string-called-template">
       <xsl:param name="param1" />
              <xsl:element name="ns0:Root">
                  <xsl:variable name="tryThisTemplate">
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                          <xsl:call-template name="identity" />
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                  </xsl:variable>
    <xsl:copy-of select="$tryThisTemplate" />
               </xsl:element>
    </xsl:template>
    <xsl:template name="identity" match="@*|node()">
       <xsl:copy>
    <xsl:apply-templates select="@*|node()" />
       </xsl:copy>
     </xsl:template>
    I have as output the XML with all tags like expected (the TestFunction take a string as input ad return the same string as output), like this:
    <ns0:Root xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node">
    - <ns0:Travel xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaIN">
      <DateTimeStart>1999-05-31T13:20:00.000-05:00</DateTimeStart>
      <Field>Field_0</Field>
      </ns0:Travel>
     </ns0:Root>
    The problem is that if I try to pass the variable to my external assembly, in this way:
    <xsl:template name="xml-to-string-called-template">
       <xsl:param name="param1" />
              <xsl:element name="ns0:Root">
                  <xsl:variable name="tryThisTemplate">
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                          <xsl:call-template name="identity" />
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                  </xsl:variable>
                  <xsl:variable name="pCC" xmlns:ScriptNS0="http://schemas.microsoft.com/BizTalk/2003/ScriptNS0"
    select="ScriptNS0:TestFunction($tryThisTemplate)" />
                    <xsl:text disable-output-escaping="yes"></xsl:text>
    <xsl:copy-of select="$pCC" />
                    <xsl:text disable-output-escaping="yes"></xsl:text>
               </xsl:element>
    </xsl:template>
    saving its return value and printing it, I have as output the values of fields contained in $tryThisTemplate variable, and not all the XML like I need:
    <ns0:Root xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node">1999-05-31T13:20:00.000-05:00
    Field_0</ns0:Root>
    What can I do to pass all the raw XML to my function and not the values of its fields?
    I tried to declare the output method as like xml than html or text but nothing changed

    First, of all your input xml has invalid namespace declaration, is this like below what mean to say:
    <ns0:Root xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node">
      <ns1:Travel xmlns:ns1="http://BizTalk_Server_ProjectDemo.SchemaIN">
        <DateTimeStart>1999-05-31T13:20:00.000-05:00</DateTimeStart>
        <Field>Field_0</Field>
      </ns1:Travel>
    </ns0:Root>
    Second, you can achieve what you are trying to map using very simple map like below:
    and you can see the xslt is generated like below:
    <?xml version="1.0" encoding="UTF-16"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 userCSharp" version="1.0" xmlns:s0="http://BizTalk_Server_ProjectDemo.SchemaIN" xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node" xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp">  <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />  <xsl:template match="/">    <xsl:apply-templates select="/ns0:Root" />  </xsl:template>  <xsl:template match="/ns0:Root">    <xsl:variable name="var:v1" select="userCSharp:StringConcat(string(s0:Travel/DateTimeStart/text()) , &quot;  &quot; , string(s0:Travel/Field/text()))" />    <ns0:Root>      <xsl:value-of select="$var:v1" />    </ns0:Root>  </xsl:template>  <msxsl:script language="C#" implements-prefix="userCSharp"><![CDATA[public string StringConcat(string param0, string param1, string param2){   return param0 + param1 + param2;}]]></msxsl:script></xsl:stylesheet>
    Third, if you are really interested passing your whole using xslt, then probably this artical will be helpful to you
    http://connectedpawns.wordpress.com/2009/08/01/how-to-copy-the-entire-node-to-element-of-string-type-in-a-map/
    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    The contents I write here is my personal views, not the view of my employer and anyone else.
    Thank you, yes you're right about the namespaces, but this is only a proof of concept ant I have to adjust it.
    What is the functoid you put in the map? And can I pass its output to an external assembly as parameter? (I need to do it and return the output to a certain schema node).
    Thank you

  • XSLT problems convert with namespaces

    We have a problem with xslt.
    we are working with RAD 6.0.1.
    We are Trying to convert XML that contain many tags to another xml using xsl file.
    on some of the tags we have namespaces.
    When we are trying to run our application that convert between the 2 xmls we are getting a new tag (the wanted tag) but all the attributes are empty. it is happanning only when the original tag has namespaces.
    has anyone have the answer to this ?
    Thanks in advance.
    P.

    In XSLT you put a prefix before the XPATH rule like this:
    p1:root/p2:subnode/element
    you declare the namespaces in header as attribute xmlns:p1="..."
    Something like:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p1="..." ...>
    In your example you have to consider, that namespaces without prefix are inherited to subnodes. That means you have to build your XPATH like this:
    p1:NemRefusionIndberetningSamling/p2:NemRefusionIndberetningStruktur/p3:HeaderStruktur/p3:ReferenceAttributTekst

  • XSLT problems

    Hi All,
    I'm having a bit of a problem with creating a XSL file in DW.
    Basically, I can't seem to get the XML page to show anything
    when applying a
    transformation document.
    I've managed it easily enough when testing with a RSS feed
    but when I try
    exactly the same process on my example XML file it simply
    fails (no errors -
    no nothing).
    Any ideas?
    XML (no XSLT)
    http://www.webitpr.com/alexaTest/test2raw.xml
    XML (w' XSLT)
    http://www.webitpr.com/alexaTest/test2.xml
    XSLT
    http://www.webitpr.com/alexaTest/test2b.xsl
    Starting to really bug me now, so any help is much, much,
    much appreciated.
    Cheers
    Justin

    further posting 14 above...
    "Justin Reid" <[email protected]>
    wrote in message
    news:ekph8s$75s$[email protected]..
    > Hi All,
    >
    > I'm having a bit of a problem with creating a XSL file
    in DW.
    >
    > Basically, I can't seem to get the XML page to show
    anything when applying
    > a transformation document.
    > I've managed it easily enough when testing with a RSS
    feed but when I try
    > exactly the same process on my example XML file it
    simply fails (no
    > errors - no nothing).
    >
    > Any ideas?
    >
    > XML (no XSLT)
    http://www.webitpr.com/alexaTest/test2raw.xml
    > XML (w' XSLT)
    http://www.webitpr.com/alexaTest/test2.xml
    > XSLT
    http://www.webitpr.com/alexaTest/test2b.xsl
    >
    > Starting to really bug me now, so any help is much,
    much, much
    > appreciated.
    >
    > Cheers
    >
    > Justin
    >
    >

  • XSLT, problem with HTML

    Hi,
    I am using XSLT to generate a webpage using an XML file and a stylesheet. The HTML page is created fine however any HTML tag i.e. the break line tag comes out in the file as &lt.;BR&gt.; rather then <.BR.> (ignore the dots, just there so the form doesnt show them incorrectly). Any suggestions? Here is my code:
    XML FILE
    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><transcript xsi:noNamespaceSchemaLocation="transcript-internal.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <section title="Outlook">
    <question>question<BR></question>
    <answer>answer</answer>
    </section>
    <disclaimer>disclaimer</disclaimer>
    </transcript>
                TransformerFactory tFactory = TransformerFactory.newInstance();
                File stypePathFile = new File(stylePath);
                if (!stypePathFile.exists())
                     logger.severe("cannot transform transcript..stylesheet does not exist at this path " + stylePath);
                StreamSource stylesource = new StreamSource(stypePathFile);
                Transformer transformer = tFactory.newTransformer(stylesource);
                transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
                transformer.setOutputProperty(OutputKeys.ENCODING, charEnc);
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
                byte bytes[] = dataXML.getBytes();
                ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
                StreamSource dataSource = new StreamSource(bais);
                StreamResult outputResult = new StreamResult(new File(outputPath));
                transformer.transform(dataSource, outputResult);
            } catch (TransformerConfigurationException tce) {
                // Error generated by the parser
                logger.severe("configuration error while transforming transcript: " + tce.getMessage());
            } catch (Exception e) {
                // Error generated by the parser
                 logger.severe("error while transforming transcript: " + e.getMessage());
        }  The XML file is created using the following code:
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class TranscriptFilter extends XMLFilterImpl {
         public static final String SECTION_PREFIX = "+s:";
         public static final String QUESTION_PREFIX = "+q:";
         public static final String ANSWER_PREFIX = "+a:";
         public static final String DISCLAIMER_PREFIX = "+d:";
         public static final String IMAGE_PREFIX = "+i:";
         public static final String NARRATION_PREFIX = "+n:";
         public static final String PREFIX_REG_EXP = "(?m)(?=\\+[sqaidn]:)";
         public static final String TRANSCRIPT_TAG = "transcript";
         public static final String SECTION_TAG = "section";
         public static final String TITLE_TAG = "title";
         public static final String NARRATION_TAG = "narration";
         public static final String QUESTION_TAG = "question";     
         public static final String ANSWER_TAG = "answer";
         public static final String DISCLAIMER_TAG = "disclaimer";
         public static final String IMAGE_TAG = "image";
         public static final String URL_TAG = "url";          
         // schema validation tags
         public static final String SCHEMA_LOCATION_TAG = "xsi:noNamespaceSchemaLocation";
         public static final String SCHEMA_LOCATION_VALUE = "transcript-internal.xsd";     
         public static final String SCHEMA_INSTANCE_TAG = "xmlns:xsi";
         public static final String SCHEMA_INSTANCE_VALUE = "http://www.w3.org/2001/XMLSchema-instance";
         private boolean inSection = false; // is section tag open but not closed
         public void parse(String pText) throws SAXException {
              String text = pText;
              String line = null;
              String prefix = null;
              if (text != null) {
                   String[] elements = text.split(PREFIX_REG_EXP);
                   if (elements != null) {
                        AttributesImpl mainAtts = new AttributesImpl();
                        mainAtts.addAttribute("", SCHEMA_LOCATION_TAG, SCHEMA_LOCATION_TAG, null, SCHEMA_LOCATION_VALUE);                    
                        mainAtts.addAttribute("", SCHEMA_INSTANCE_TAG, SCHEMA_INSTANCE_TAG, null, SCHEMA_INSTANCE_VALUE);
                        startElement("", TRANSCRIPT_TAG, TRANSCRIPT_TAG, mainAtts);
                        for (int i = 0; i < elements.length; i++) {
                             if (elements[i] != null)
                                  line = elements.trim();
                                  if (line.length() > 3) {
                                       // return prefix to determine line data type
                                       prefix = getPrefix(line);
                                       line = removePrefix(line);
                                       if (prefix != null) {
                                            if (prefix.equalsIgnoreCase(SECTION_PREFIX)) {
                                                 closeSection(); // close section if open
                                                 AttributesImpl fieldAtts = new AttributesImpl();
                                                 fieldAtts.addAttribute("", TITLE_TAG, TITLE_TAG, null, line);
                                                 startElement("", SECTION_TAG, SECTION_TAG, fieldAtts);
                                                 inSection = true;
                                            else if (prefix.equalsIgnoreCase(NARRATION_PREFIX)) {
                                                 startElement("", NARRATION_TAG, NARRATION_TAG, new AttributesImpl());
                                                 characters(line);
                                                 endElement("", NARRATION_TAG, NARRATION_TAG);
                                            else if (prefix.equalsIgnoreCase(IMAGE_PREFIX)) {
                                                 AttributesImpl fieldAtts = new AttributesImpl();
                                                 fieldAtts.addAttribute("", URL_TAG, URL_TAG, null, line);
                                                 startElement("", IMAGE_TAG, IMAGE_TAG, fieldAtts);
                                                 endElement("", IMAGE_TAG, IMAGE_TAG);
                                            else if (prefix.equalsIgnoreCase(QUESTION_PREFIX)) {
                                                 startElement("", QUESTION_TAG, QUESTION_TAG, new AttributesImpl());
                                                 characters(line);
                                                 endElement("", QUESTION_TAG, QUESTION_TAG);
                                            else if (prefix.equalsIgnoreCase(ANSWER_PREFIX)) {
                                                 startElement("", ANSWER_TAG, ANSWER_TAG, new AttributesImpl());
                                                 characters(line);
                                                 endElement("", ANSWER_TAG, ANSWER_TAG);
                                            else if (prefix.equalsIgnoreCase(DISCLAIMER_PREFIX)) {
                                                 closeSection(); // close section if open
                                                 startElement("", DISCLAIMER_TAG, DISCLAIMER_TAG, new AttributesImpl());
                                                 characters(line);
                                                 endElement("", DISCLAIMER_TAG, DISCLAIMER_TAG);
                        closeSection(); // close section if open
                        endElement("", TRANSCRIPT_TAG, TRANSCRIPT_TAG);
         // closes the section tag if open
         private void closeSection() throws SAXException {
              if (inSection)
                   endElement("", SECTION_TAG, SECTION_TAG);
              inSection = false;
         // overrides super class method
         private void characters(String pLine) throws SAXException {
              if (pLine != null) {
                   char[] chars = pLine.toCharArray();
                   super.characters(chars, 0, chars.length);
         // returns the prefix for a line
         private String getPrefix(String pLine) {
              String line = pLine;
              String prefix = null;
              if (validLine(line))
                   prefix = line.substring(0,3);
              return prefix;
         private String removePrefix(String pLine) {
              String line = pLine;
              String newLine = "";
              if (validLine(line))
                   newLine = line.substring(3, line.length()).trim();
              return newLine;
         private boolean validLine(String pLine) {
              if (pLine != null && pLine.length() > 3)
                   return true;
              else
                   return false;

    Your 1,000 lines of code were indented so deeply that they scrolled off the right side of my screen and were extremely inconvenient to read. So I didn't read it.
    However. Your question claimed to be about XSLT but I didn't see any XSLT posted. That was sort of strange. Anyway, if you are generating character strings containing <BR> then what you see is what you have to expect. If you want a <BR> element then generate a <BR> element. Like the one you see in the XML example you posted. (What was the relevance of that example, anyway? I didn't get that either. Was it supposed to represent the input you hoped that code was generating, or something?)

  • XSLT problem w/ ora:getProcessVersion

    I am running version 10.1.3.3.
    I am using a BPEL XPath extension function in a Transform activity in a BPEL process. I open the XSLT Designer, select "Advanced Functions", and choose "xpath-expression" from the component pallette.
    With the cursor in the "XPath Expression" field, I hit "ctrl-space" to select ora:getProcessVersion. I save my XSLT doc, and deploy my BPEL service to my server.
    When my process runs, I get the following in my log:
    XML-22016: (Error) Extension function namespace should start with 'http://www.oracle.com/XSL/Transform/java/'.
    I am allowing the editor to create the namespace for the XPath expression. How do I fix this?

    XSL w/ function:
    <ns0:SourceProcess>
    <ns0:DomainId>
    <xsl:value-of select="ora:getDomainId()"/>
    </ns0:DomainId>
    <ns0:ProcessId>
    <xsl:value-of select="ora:getProcessId()"/>
    </ns0:ProcessId>
    <ns0:ProcessVersion>
    <xsl:value-of select="ora:getProcessVersion()"/>
    </ns0:ProcessVersion>
    <ns0:ProcessURL>
    <xsl:value-of select="ora:getProcessURL()"/>
    </ns0:ProcessURL>
    <ns0:InstanceId>
    <xsl:value-of select="ora:getInstanceId()"/>
    </ns0:InstanceId>
    </ns0:SourceProcess>
    Namespace definition
    xmlns:ora="http://schemas.oracle.com/xpath/extension"

Maybe you are looking for

  • HT4437 NFL Game Pass App_Connect to HDTV

    I have the NFL Game Pass APP on my Ipad 2 here in Germany.  It works great on the Ipad and I am now attempting to connect to my HDTV with the Apple Composite AV Cable.  When I use Itunes movies or YouTube videos, the video/audio are perfect; however,

  • Cheque print thru F-48 Downpayment to Vendor

    Hello Experts, Business Scenario : I m have to make just 1 or 2 down-payment to Vendors, for this i need not run Auto Payment Program. However, i wish to provide those Vendors with a print cheque thru the system (like that of F-58). please help how d

  • Calling Javascript function from PL/SQL Page Process

    Hi All, So far I have seen many threads that answered the question: Calling a PL/SQL from a Javascript function. I would like to know if it's posiible to do the reverse process as follows: DECLARE    v_name APPLICANTS.NAME%Type;    v_surname APPLICAN

  • New computer need to sync ipod

    Hey guys! so i just got a new computer and it has some of the music from the itunes that was on my old computer but the last time i backed it up was a while ago.. therefore .. i have music on my ipod that is not on my current itunes.. my question is

  • IPod won't go past the "Welcome" page on iTunes?

    I broke my old iPod screen and got a new one yesterday. I restored everything from my old device through iTunes on my MacBook Pro, but whenever I try to put music from iTunes to my iPod, I find the "Welcome to your new iPod" screen. I got all my impo