XSL transformation with xsl:import generates exceptions

I am using the Schematron's basic XSL file basic-schematron.xsl to validate the XML format of one of our data files. The XSL file looks something like this
================
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
<xsl:import href="skeleton1-5.xsl"/>
<xsl:template name="process-prolog">
<axsl:output method="text" />
</xsl:template>
==================
But, the validation fails while trying to run the transformation on my Schematron input file using this basic-schematron.xsl with java.lang.NoSuchMethodError:
======= OUTPUT ============
Markup Error: no match attribute on <key> outside <rule>
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: GregorSamsa.process$dash$root(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;ILjava/lang/Object;)V
     at GregorSamsa.applyTemplates()
     at GregorSamsa.applyTemplates()
     at GregorSamsa.transform()
     at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594)
     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:640)
     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
     at com.solipsa.xsdvalidator.XSDValidator.validateSchematron(XSDValidator.java:137)
     at com.solipsa.xsdvalidator.XSDValidator.validate(XSDValidator.java:181)
     at com.solipsa.xsdvalidator.XSDValidatorUI.jButton1ActionPerformed(XSDValidatorUI.java:244)
     at com.solipsa.xsdvalidator.XSDValidatorUI.access$300(XSDValidatorUI.java:21)
     at com.solipsa.xsdvalidator.XSDValidatorUI$4.actionPerformed(XSDValidatorUI.java:140)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
     at java.awt.Component.processMouseEvent(Component.java:5488)
     at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
     at java.awt.Component.processEvent(Component.java:5253)
     at java.awt.Container.processEvent(Container.java:1966)
     at java.awt.Component.dispatchEventImpl(Component.java:3955)
     at java.awt.Container.dispatchEventImpl(Container.java:2024)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
     at java.awt.Container.dispatchEventImpl(Container.java:2010)
     at java.awt.Window.dispatchEventImpl(Window.java:1766)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
============= OUTPUT ==============
I tried the individual JAXP 1.3 for J2SDK 1.4.2 (Using the -Djava.endorsed.dirs JVM param) and tried the JDK 1.5.0_02 which has JAXP 1.3 inbuilt and they all fail.
I tried the above with separate Xalan/Xerces jar files, and then it works fine.
The problem seems to be somthing specific to the JAXP 1.3 environment. I can provide more details, if required. Any help is highly appreciated.

One morning your code woke up and found it had been transformed into a giant insect.
But seriously, here's the name of the method that doesn't exist:GregorSamsa.process$dash$rootIs GregorSamsa your class? Maybe your server has an old version of it which is missing that method? (Or: those $ signs look strange to me, maybe they are a mistranslation of some other character?)

Similar Messages

  • XSL transformation with java binding

    Hi everyone!
    I am trying to implement na XSL transformation that uses java code binding.
    My XSL looks as follows:
    <i><xsl:stylesheet xmlns:myobj="java.lang.System"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms">
    <xsl:param name="myobj"/>
    <xsl:value-of select="string(myobj:currentTimeMillis())"/>
    </xsl:stylesheet></i>
    Everything works fine - current time is displayed.
    But when I try to use my custom java class the compiler returns an exception:
    <i>com.sapportals.wcm.WcmException: com.sap.engine.lib.xml.util.NestedException: Could not load class: ep.UmeLookup required for execution of 'UmeLookup.isReady'</i>
    My second xsl stytesheet with a reference to custom class looks as follows:
    <i><xsl:stylesheet xmlns:ume="ep.UmeLookup" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms">
    <xsl:param name="ume"/>
    <xsl:value-of select="string(ume:UmeLookup.isReady())"/>
    </xsl:stylesheet></i>
    I developed java class (ep.UmeLookup), made a .jar from it, included the jar archive in a Library project and deployed the library to the J2EE engine.
    It looks like my class is not 'visible' in J2EE engine, while in my opinion it should be. Does anyone know how to change that??
    BR / marek

    Ask this lady a question. Maybe she could answer your question.
    XSLT Mapping With JAVA Enhancement ( For Beginners)

  • Preferences import generates exception.

    Hi!
    So, here is a newbie question:
    Is it possible to use the new preferences API together with JDeveloper9i?
    When I create a simple new project, using J2SE1.4 and do something like this:
    try
    Preferences.importPreferences( new FileInputStream( "C:\\JDev9i\\jdev\\mywork\\System.xml" ) );
    catch (Exception ex)
    ex.printStackTrace();
    everything works okay. When I try to use the very same lines in my JClient client project, accessing a BC4J module in local deployment (no app server), I get an exception:
    java.lang.ClassCastException: oracle.xml.parser.v2.DTD
         at java.util.prefs.XmlSupport.importPreferences(XmlSupport.java:182)
         at java.util.prefs.Preferences.importPreferences(Preferences.java:1138)
         at test.Untitled1.<init>(Untitled1.java:38)
         at test.Untitled1.main(Untitled1.java:68)
    Has anyone else experienced this? In my simple project it works, in my real project I get an exception. The Oracle XML parser is not part of either project.
    Thanx in advance for your help!
    Sascha Herrmann

    I think there are a couple of things going on here.
    [list=1]
    [*] is that while parsing the Text.xml file, our XML parser is opening the DTD referenced in the DOCTYPE which it must do to see if the DTD has any default attribute values which need to be included in the parsed tree representation).
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE preferences SYSTEM 'http://java.sun.com/dtd/preferences.dtd'>
    <preferences EXTERNAL_XML_VERSION="1.0">
      <root type="user">
        <map />
        <node name="Test">
          <map>
            <entry key="TestEntry" value="true" />
          </map>
        </node>
      </root>
    </preferences>If you don't have your proxy server set correctly, then the attempt to fetch the DTD at it's SYSTEM id URI: http://java.sun.com/dtd/preferences.dtd will hang, and then ultimately fail.
    [*] There is a bug in the JDK 1.4 java.util.prefs.XmlSupport class at line 183:
    ((Element)doc.getChildNodes().item(1)).getAttribute("EXTERNAL_XML_VERSION");.
    where they are making a (bold, and bad) assumption that the 2nd child node of the document object IS the document element. This is not necessary true, and in fact with both Oracle XML Parser 9.0.2 and Apache Xerces 2.1.0 that I tested, it's a bad assumption since both of these JAXP 1.1 compliant XML Parsers fail the simple test example class of:
    import java.io.FileInputStream;
    import java.util.prefs.Preferences;
    public class Test {
    public static void main(String[] args) throws Throwable {
          Preferences.importPreferences(
                        new FileInputStream( "C:\\temp\\sacha\\PrefsTest\\Test.xml" ) );
          System.out.println("ok");
    At line 183 when XmlSupport tries to cast the 2nd child of the document node to (Element), Xerces 2.1.0 fails with
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl.
    and Oracle XML Parser 9.0.2 fails with:
    java.lang.ClassCastException: oracle.xml.parser.v2.DTD.
    they should have written instead:
    String xmlVersion = doc.getDocumentElement().getAttribute("EXTERNAL_XML_VERSION");.
    instead of what they did.
    [list]
    Of course, it works OK when you use the Sun Crimson XML parser which is included by default in the JDK 1.4, and apparently that's the only one they tested.
    However, JClient requires the Oracle XML Parser so you need to use the Oracle XML Parser implementation of JAXP 1.1 (which should work fine, except for this bug). I patched the java.util.XmlSupport class, and prepended my fixed version of this class to the System classpath by adding the following Java VM command line parameter:
    -Xbootclasspath/p:C:\temp\xmlsupportfix\classes.
    and then I'm able to run your Client example with no problems.
    Not sure if Sun knows about this bug, but I'll look into it.
    I've attached my patched version of this JDK 1.4 class. I changed like 183 and line 192 (which had another use of the "bad assumption" DOM code.) Here it is:
    * @(#)XmlSupport.java  1.10 01/12/03
    * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    package java.util.prefs;
    import java.util.*;
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    import org.apache.crimson.tree.*;
    * XML Support for java.util.prefs. Methods to import and export preference
    * nodes and subtrees.
    * @author  Josh Bloch and Mark Reinhold
    * @version 1.10, 12/03/01
    * @see     Preferences
    * @since   1.4
    class XmlSupport {
        // The required DTD URI for exported preferences
        private static final String PREFS_DTD_URI =
            "http://java.sun.com/dtd/preferences.dtd";
        // The actual DTD corresponding to the URI
        private static final String PREFS_DTD =
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
            "<!-- DTD for preferences -->"               +
            "<!ELEMENT preferences (root) >"             +
            "<!ATTLIST preferences"                      +
            " EXTERNAL_XML_VERSION CDATA \"0.0\"  >"     +
            "<!ELEMENT root (map, node*) >"              +
            "<!ATTLIST root"                             +
            "          type (system|user) #REQUIRED >"   +
            "<!ELEMENT node (map, node*) >"              +
            "<!ATTLIST node"                             +
            "          name CDATA #REQUIRED >"           +
            "<!ELEMENT map (entry*) >"                   +
            "<!ATTLIST map"                              +
            "  MAP_XML_VERSION CDATA \"0.0\"  >"         +
            "<!ELEMENT entry EMPTY >"                    +
            "<!ATTLIST entry"                            +
            "          key CDATA #REQUIRED"              +
            "          value CDATA #REQUIRED >"          ;
         * Version number for the format exported preferences files.
        private static final String EXTERNAL_XML_VERSION = "1.0";
         * Version number for the internal map files.
        private static final String MAP_XML_VERSION = "1.0";
         * Export the specified preferences node and, if subTree is true, all
         * subnodes, to the specified output stream.  Preferences are exported as
         * an XML document conforming to the definition in the Preferences spec.
         * @throws IOException if writing to the specified output stream
         *         results in an <tt>IOException</tt>.
         * @throws BackingStoreException if preference data cannot be read from
         *         backing store.
         * @throws IllegalStateException if this node (or an ancestor) has been
         *         removed with the {@link #removeNode()} method.
        static void export(OutputStream os, final Preferences p, boolean subTree)
            throws IOException, BackingStoreException {
            if (((AbstractPreferences)p).isRemoved())
                throw new IllegalStateException("Node has been removed");               
            XmlDocument doc = new XmlDocument();
            doc.setDoctype(null, PREFS_DTD_URI, null);
            Element preferences =  (Element)
                doc.appendChild(doc.createElement("preferences"));
            preferences.setAttribute("EXTERNAL_XML_VERSION", EXTERNAL_XML_VERSION);
            Element xmlRoot =  (Element)
            preferences.appendChild(doc.createElement("root"));
            xmlRoot.setAttribute("type", (p.isUserNode() ? "user" : "system"));
            // Get bottom-up list of nodes from p to root, excluding root
            List ancestors = new ArrayList();
            for (Preferences kid = p, dad = kid.parent(); dad != null;
                                       kid = dad, dad = kid.parent()) {
                ancestors.add(kid);
            Element e = xmlRoot;                       
            for (int i=ancestors.size()-1; i >= 0; i--) {
                e.appendChild(doc.createElement("map"));
                e = (Element) e.appendChild(doc.createElement("node"));
                e.setAttribute("name", ((Preferences)ancestors.get(i)).name());
            putPreferencesInXml(e, doc, p, subTree);
            doc.write(os);
         * Put the preferences in the specified Preferences node into the
         * specified XML element which is assumed to represent a node
         * in the specified XML document which is assumed to conform to
         * PREFS_DTD.  If subTree is true, create children of the specified
         * XML node conforming to all of the children of the specified
         * Preferences node and recurse.
         * @throws BackingStoreException if it is not possible to read
         *         the preferences or children out of the specified
         *         preferences node.
        private static void putPreferencesInXml(Element elt, Document doc,
                   Preferences prefs, boolean subTree) throws BackingStoreException
            Preferences[] kidsCopy = null;
            String[] kidNames = null;
            // Node is locked to export its contents and get a
            // copy of children, then lock is released,
            // and, if subTree = true, recursive calls are made on children
            synchronized (((AbstractPreferences)prefs).lock) {
                // Check if this node was concurrently removed. If yes
                // remove it from XML Document and return.
                if (((AbstractPreferences)prefs).isRemoved()) {
                    elt.getParentNode().removeChild(elt);
                    return;
                // Put map in xml element           
                String[] keys = prefs.keys();
                Element map = (Element) elt.appendChild(doc.createElement("map"));
                for (int i=0; i<keys.length; i++) {
                    Element entry = (Element)
                        map.appendChild(doc.createElement("entry"));
                    entry.setAttribute("key", keys);
    // NEXT STATEMENT THROWS NULL PTR EXC INSTEAD OF ASSERT FAIL
    entry.setAttribute("value", prefs.get(keys[i], null));
    // Recurse if appropriate
    if (subTree) {
    /* Get a copy of kids while lock is held */
    kidNames = prefs.childrenNames();
    kidsCopy = new Preferences[kidNames.length];
    for (int i = 0; i < kidNames.length; i++)
    kidsCopy[i] = prefs.node(kidNames[i]);
    // release lock
    if (subTree) {
    for (int i=0; i < kidNames.length; i++) {
    Element xmlKid = (Element)
    elt.appendChild(doc.createElement("node"));
    xmlKid.setAttribute("name", kidNames[i]);
    putPreferencesInXml(xmlKid, doc, kidsCopy[i], subTree);
    * Import preferences from the specified input stream, which is assumed
    * to contain an XML document in the format described in the Preferences
    * spec.
    * @throws IOException if reading from the specified output stream
    * results in an <tt>IOException</tt>.
    * @throws InvalidPreferencesFormatException Data on input stream does not
    * constitute a valid XML document with the mandated document type.
    static void importPreferences(InputStream is)
    throws IOException, InvalidPreferencesFormatException
    try {
    Document doc = load(is);
    String xmlVersion =
    // SPM - Fix bad assumption of getChildNodes().item(1)
    doc.getDocumentElement().getAttribute("EXTERNAL_XML_VERSION");
    if (xmlVersion.compareTo(EXTERNAL_XML_VERSION) > 0)
    throw new InvalidPreferencesFormatException(
    "Exported preferences file format version " + xmlVersion +
    " is not supported. This java installation can read" +
    " versions " + EXTERNAL_XML_VERSION + " or older. You may need" +
    " to install a newer version of JDK.");
    // SPM - Fix bad assumption of getChildNodes().item(1)
    Element xmlRoot = (Element)doc.getDocumentElement().getChildNodes().item(0);
    Preferences prefsRoot =
    (xmlRoot.getAttribute("type").equals("user") ?
    Preferences.userRoot() : Preferences.systemRoot());
    ImportSubtree(prefsRoot, xmlRoot);
    } catch(SAXException e) {
    throw new InvalidPreferencesFormatException(e);
    * Load an XML document from specified input stream, which must
    * have the requisite DTD URI.
    private static Document load(InputStream in)
    throws SAXException, IOException
    Resolver r = new Resolver();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setIgnoringElementContentWhitespace(true);
    dbf.setValidating(true);
    dbf.setCoalescing(true);
    try {
    DocumentBuilder db = dbf.newDocumentBuilder();
    db.setEntityResolver(new Resolver());
    db.setErrorHandler(new EH());
    return db.parse(new InputSource(in));
    } catch (ParserConfigurationException x) {
    throw new Error(x);
    * Recursively traverse the specified preferences node and store
    * the described preferences into the system or current user
    * preferences tree, as appropriate.
    private static void ImportSubtree(Preferences prefsNode, Element xmlNode) {
    NodeList xmlKids = xmlNode.getChildNodes();
    int numXmlKids = xmlKids.getLength();
    * We first lock the node, import its contents and get
    * child nodes. Then we unlock the node and go to children
    * Since some of the children might have been concurrently
    * deleted we check for this.
    Preferences[] prefsKids;
    /* Lock the node */
    synchronized (((AbstractPreferences)prefsNode).lock) {
    //If removed, return silently
    if (((AbstractPreferences)prefsNode).isRemoved())
    return;
    // Import any preferences at this node
    Element firstXmlKid = (Element) xmlKids.item(0);
    ImportPrefs(prefsNode, firstXmlKid);
    prefsKids = new Preferences[numXmlKids - 1];
    // Get involved children
    for (int i=1; i < numXmlKids; i++) {
    Element xmlKid = (Element) xmlKids.item(i);
    prefsKids[i-1] = prefsNode.node(xmlKid.getAttribute("name"));
    } // unlocked the node
    // import children
    for (int i=1; i < numXmlKids; i++)
    ImportSubtree(prefsKids[i-1], (Element)xmlKids.item(i));
    * Import the preferences described by the specified XML element
    * (a map from a preferences document) into the specified
    * preferences node.
    private static void ImportPrefs(Preferences prefsNode, Element map) {
    NodeList entries = map.getChildNodes();
    for (int i=0, numEntries = entries.getLength(); i < numEntries; i++) {
    Element entry = (Element) entries.item(i);
    prefsNode.put(entry.getAttribute("key"),
    entry.getAttribute("value"));
    * Export the specified Map<String,String> to a map document on
    * the specified OutputStream as per the prefs DTD. This is used
    * as the internal (undocumented) format for FileSystemPrefs.
    * @throws IOException if writing to the specified output stream
    * results in an <tt>IOException</tt>.
    static void exportMap(OutputStream os, Map map) throws IOException {
    XmlDocument doc = new XmlDocument();
    doc.setDoctype(null, PREFS_DTD_URI, null);
    Element xmlMap = (Element) doc.appendChild(doc.createElement("map"));
    xmlMap.setAttribute("MAP_XML_VERSION", MAP_XML_VERSION);
    for (Iterator i = map.entrySet().iterator(); i.hasNext(); ) {
    Map.Entry e = (Map.Entry) i.next();
    Element xe = (Element)
    xmlMap.appendChild(doc.createElement("entry"));
    xe.setAttribute("key", (String) e.getKey());
    xe.setAttribute("value", (String) e.getValue());
    doc.write(os);
    * Import Map from the specified input stream, which is assumed
    * to contain a map document as per the prefs DTD. This is used
    * as the internal (undocumented) format for FileSystemPrefs. The
    * key-value pairs specified in the XML document will be put into
    * the specified Map. (If this Map is empty, it will contain exactly
    * the key-value pairs int the XML-document when this method returns.)
    * @throws IOException if reading from the specified output stream
    * results in an <tt>IOException</tt>.
    * @throws InvalidPreferencesFormatException Data on input stream does not
    * constitute a valid XML document with the mandated document type.
    static void importMap(InputStream is, Map m)
    throws IOException, InvalidPreferencesFormatException
    try {
    Document doc = load(is);
    Element xmlMap = (Element) doc.getChildNodes().item(1);
    // check version
    String mapVersion = xmlMap.getAttribute("MAP_XML_VERSION");
    if (mapVersion.compareTo(MAP_XML_VERSION) > 0)
    throw new InvalidPreferencesFormatException(
    "Preferences map file format version " + mapVersion +
    " is not supported. This java installation can read" +
    " versions " + MAP_XML_VERSION + " or older. You may need" +
    " to install a newer version of JDK.");
    NodeList entries = xmlMap.getChildNodes();
    for (int i=0, numEntries=entries.getLength(); i<numEntries; i++) {
    Element entry = (Element) entries.item(i);
    m.put(entry.getAttribute("key"), entry.getAttribute("value"));
    } catch(SAXException e) {
    throw new InvalidPreferencesFormatException(e);
    private static class Resolver implements EntityResolver {
    public InputSource resolveEntity(String pid, String sid)
    throws SAXException
    if (sid.equals(PREFS_DTD_URI)) {
    InputSource is;
    is = new InputSource(new StringReader(PREFS_DTD));
    is.setSystemId(PREFS_DTD_URI);
    return is;
    throw new SAXException("Invalid system identifier: " + sid);
    private static class EH implements ErrorHandler {
    public void error(SAXParseException x) throws SAXException {
    throw x;
    public void fatalError(SAXParseException x) throws SAXException {
    throw x;
    public void warning(SAXParseException x) throws SAXException {
    throw x;

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
    <xsl:template match="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • Problem with xsl??

    Hi all,
    I am new to xsl and have to work on a web client. Here's my xsl file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
    <xsl:output method="html"/>
    <xsl:template match="somename">
    <html>
    <head>
         <title></title>
         <link rel="stylesheet" type="text/css" href="css/style.css"/>
         <script language="JavaScript">
    I get an error for the JavaScript part saying that the 'language' attr is unknown.
    Also in all the xsl files used in the project, it is not recognizing javascript or html elements like bgcolor and stuff.
    Can somebody please tell me what the problem is???
    Thanks

    I have done this many times and it works for me.
    <xsl:template match="/">
            <html>
                <head>
                    <title>Page Title</title>
                    <script language="Javascript" src="js/scripts.js"></script>
    ...Are you closing your script tag? Thats all I can think of.

  • How can I use JavaScript extention functions with Xalan for transforming XML with XSL

    While transforming standart XML and XSL files to HTML with this servlet:
    package mypackage1;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.net.URL;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import org.mozilla.javascript;
    public class Servlet2 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    try
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xmlSource = new StreamSource(new FileReader("c:/aaa.xml"));
    Source xslSource = new StreamSource(new FileReader("c:/bbb.xsl"));
    Transformer transformer = tFactory.newTransformer(xslSource);
    transformer.transform (xmlSource, new StreamResult(out));
    catch (Exception e)
    e.printStackTrace();
    everything is going ok,
    but when try to use javascript function in XSL file, for example like in this:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt" xmlns:my-ext="ext1"
    extension-element-prefixes="my-ext">
    <lxslt:component prefix="my-ext"
    functions="getdate">
    <lxslt:script lang="javascript">
    function getdate() {
    var d = new Date();
    return d.toUTCString();
    </lxslt:script>
    </lxslt:component>
    <xsl:template match="/">
    <p><xsl:copy-of select="my-ext:getdate()"/></p>
    </xsl:template>
    </xsl:stylesheet>
    recieve error-message:
    XSL-1000: (Fatal Error) Error while parsing XSL file (Extension function namespace should start with 'http://www.oracle.com/XSL/Transform/java/'.).
    What kind of namespace I should specify?

    Hello, Paul.
    I'm sure you may not use JavaScript as a language for creating XSLT extention functions with Oracle XDK Parser. This is since parser might have JavaScript interpreter to work with JavaScript, but it has not.
    If you need to build any XSLT extention functions you must build them as Java class' static methods.
    After that, you define the usage of the class by mean of namespace declaration as:
    xmlns:your-ns="http://www.oracle.com/XSL/Transform/java/yourpackage.Yourclass"
    (Prefix "http://www.oracle.com/XSL/Transform/java/" may differs if you use non-Oracle XML parser)
    and use class' static method in XSLT:
    <xsl:value-of select="your-ns.staticMethodName(paramsIfAny)"/>
    In your case you may wish to use standard Date class:
    xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date"
    <xsl:value-of select="date:toString(date:new)"/>

  • Unable to transform XML with XSL in java code

    Hi,
    Could somebody please tell me what's wrong with my code, why it isn't transform the XML with XSL to the output that I want. If I use the command line to transform the XML, it output perfectly:
    java org.apache.xalan.xslt.Process -in marc.xml -xsl MARC21slim2MODS.xsl -out out.xml
    Here is the code of my program to transform the XML with XSL, I am using xalan-j_2_2-bin:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import org.w3c.dom.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.dom.*;
    import java.math.BigInteger;
    String xslDoc = "MODS.xsl";
    String xmlResult = "out.xml";
    DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
    dfactory.setNamespaceAware(true);
    DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
    Document xmlDoc = docBuilder.newDocument();
    Element root = xmlDoc.createElement("collection");
    root.setAttribute("xmlns", "http://www.loc.gov/MARC21/slim");
    xmlDoc.appendChild(root);
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(new StreamSource(xslDoc));
    FileWriter fw = new FileWriter(new File(xmlResult));
    StreamResult output = new StreamResult(fw);
    transformer.transform(new DOMSource(xmlDoc), output);
    fw.flush();
    fw.close();
    ========================
    marc.xml -- source XML file
    ========================
    <?xml version="1.0" encoding="UTF-8"?>
    <collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01488cam 2200337 a 4500</leader><controlfield tag="001">2502929</controlfield><controlfield tag="005">19930521155141.9</controlfield><controlfield tag="008">920219s1993 caua j 000 0 eng </controlfield><datafield ind1=" " ind2=" " tag="035"><subfield code="9">(DLC) 92005291</subfield></datafield><datafield ind1=" " ind2=" " tag="906"><subfield code="a">7</subfield><subfield code="b">cbc</subfield><subfield code="c">orignew</subfield><subfield code="d">1</subfield><subfield code="e">ocip</subfield><subfield code="f">19</subfield><subfield code="g">y-gencatlg</subfield></datafield>
    </record></collection>
    ========================
    out.xml -- result using command line
    ========================
    <?xml version="1.0" encoding="UTF-8"?>
    <collection xmlns="http://www.loc.gov/mods/" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/ http://www.loc.gov/standards/marcxml/schema/mods.xsd">
    <mods>
    <titleInfo>
    <title>Arithmetic</title>
    </titleInfo>
    <name type="personal">
    <namePart>Sandburg, Carl</namePart>
    <namePart type="date">1878-1967</namePart>
    <role>creator</role>
    </name>
    </mods>
    </collection>
    ========================
    out.xml -- result using my java program
    ========================
    <?xml version="1.0" encoding="UTF-8"?>
    <collection xmlns="http://www.loc.gov/mods/" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/ http://www.loc.gov/standards/marcxml/schema/mods.xsd">01488cam 2200337 a 4500250292919930521155141.9920219s1993 caua j 000 0 eng (DLC) 920052917cbcorignew1ocip19y-gencatlgpc16 to br00 02-19-92; br02 to SCD 02-21-92; fd11 02-24-92 (PS3537.A618 A...); fa00 02-26-92; fa05 03-02-92; fm31 03-06-92; CIP ver. pv08 04-16-93; pv01 to CLT 04-20-93; lb10 05-21-93
    </collection>

    I am using the same XSL file. My Java program use the same XSL file I used in the command line.
    It is possible that my Java code is using a different parser, but I developed a seperate program to parse the XML using the same parser that my Java code is using. It output the result I expected. Here is the code for the program:
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class Convertor {
    public static void main(String[] args) throws Exception {
    String xslDoc = "MARC21slim2MODS.xsl";
    String xmlResult = "out.xml";
    String xmlDoc = marc.xml";
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(new StreamSource(xslDoc));
    StreamSource xmlSource = new StreamSource(xmlDoc);
    FileWriter fw = new FileWriter(new File(xmlResult));
    StreamResult output = new StreamResult(fw);
    transformer.transform(xmlSource, output);
    }

  • XSL transformation exception when using it in a subprocess

    Hi all
    I want to use a service task in sub-process that call a function with ref_cursor return type, when i map data association from output parameters to data object with xsl transformation an exception raise.
    in other hand my sub-process properties are : multiInstance, parallel , collection ,loop data input use an array , which create instances according to items of given array like http://www.avioconsulting.com/blog/simultaneous-creation-instances-array-oracle-bpm-11g
    by the way this feature works on service task that placed out of sub-process correctly.
    2.

    Hi Fazel,
    XSLT mapping is not working in the unpatched version of Oracle BPM 12c currently available.
    This work around is not great or even close to it, but the only way I've heard of anyone getting it to work is to right mouse click each of the individual children nodes.
    Know this bug has been reported by many people and has had a significant impact to all of us so it might be worth contacting Support to see if there might be a patch.
    Dan

  • Problem with xsl:import and xsl:apply-templates select="element_name"

    I import a xsl tranformation into another xsl file.
    During the transformation i want to limit the transformation to certain xml elements using the select attribute in apply-templates. However if I want restrict to xml elements whose templates are defined in the imported file, they will not be called.
    I'm using currently JWSDP1.4 but problem was also with 1.3.
    Can anybody help: Is this not xslt spec compliant or just a bug inXALAN ?
    regards pszawlow

    Solved it by myself:
    the problem was not the import but the following:
    xml file: looks like:
    <a>
       <b>
       </b>
        <c>
        </c>
    </a>xsl file looked like and should omit output of <c> </c>:
    <xsl:template match="/">
    <xsl:apply-templates select="b" />
    </xsl:template>
    <xsl:template match="b">
    </xsl:template>
    However / is not the level <a>, which I thought. So there was no matching <b>.
    I changed the xsl file to:
    <xsl:template match="/">
    <xsl:apply-templates />
    </xsl:template>
    <xsl:template match="a">
    <xsl:apply-templates select="b" />
    </xsl:template>
    <xsl:template match="b">
    </xsl:template>
    and it worked !

  • Error using custom xpath function with XSL transformations in BPM

    Hi,
    We have created a custom xpath function for use with SOA Suite and BPM. This has been built as per specified within the http://docs.oracle.com/cd/E29597_01/dev.1111/e10224/bp_appx_functs.htm#SOASE11100. We have also reviewed the Oracle Sample for mapper-107-ExtensionFunctions (sample demonstrates the use of user-defined extension functions). This has been registered with jDeveloper and SOA within the oracle.soa.ext_11.1.1 (run ant to include in oracle.soa.ext.jar)
    We ideally want to use this is BPM within an xsl. However when consuming this function is either BPEL or BPM using an xsl, the xsl fails with an error such as:
    XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("xsl/Transformation_1.xsl", $inputVariable.payload). The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/gwCustomXpathUtil_rev1.0/xsl/Transformation_1.xsl<Line 9, Column 113>: XML-22043: (Error) Extension function error: Method not found 'getWeekDayDate'. Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
    In an Assign it operates fine and returns the expected result. We have included a combination of both of the Config files (ext-mapper-xpath-functions-config.xml and ext-soa-xpath-functions-config.xml) in the META-INF folder, however neither allow the use of this function in the XSL.
    I believe there may be an issue getting the custom xpath functions within XSL files. Hence I have also raised an SR. Has anyone experiences of this?
    Our SOA / BPM suite environment is using 11.1.1.6.4 and has the following patches applied:
    13801175
    14406487 (11.1.1.6.4 SOA Bundle)
    13896993
    13088538
    Regards Dave
    Edited by: DavidGaskell on Mar 14, 2013 10:08 PM

    Hi All,
    I am also facing the same issue...Experts can you please help us.
    hi DavidGaskell, did you find any resolution, if so can you share it with me.....
    Thanks,
    RR

  • Error with XSL Transformation

    From my application log I see an exception where it tries to call the oracle.xml.parser.v2.XSLProcessor.
    The servlet for the login screen (XSL transformation) takes XML and returns HTML. Actually for the xml parsing
    we use xerces I don't understand why we would call the ORACLE parser? Do you have any idea? Is this a CLASSPATH
    or configuration problem? Is there a way to use the xml parser xerces instead the oracle one.
    <log4j:event logger="com.siemens.srvcmgmt.common.server.PresentationHandler" timestamp="1052834094464" level="DEBUG" thread="ApplicationServerThread-5">
    <log4j:message><![CDATA[Error: ]]></log4j:message>
    <log4j:NDC><![CDATA[1 Security doPost sendLoginScreen PresentationHandler transformIt]]></log4j:NDC>
    <log4j:throwable><![CDATA[java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:375)
    at oracle.xml.parser.v2.XSLProcessor.setParam(XSLProcessor.java:658)
    at oracle.xml.jaxp.JXTransformer.setParameter(JXTransformer.java:385)
    at com.siemens.srvcmgmt.common.server.PresentationHandler.transformIt(PresentationHandler.java:149)
    at com.siemens.srvcmgmt.smc.servlet.Security.sendLoginScreen(Security.java:596)
    at com.siemens.srvcmgmt.smc.servlet.Security.doPost(Security.java:105)
    at com.siemens.srvcmgmt.smc.servlet.Security.doGet(Security.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
    at java.lang.Thread.run(Thread.java:479)
    ]]></log4j:throwable>

    From my application log I see an exception where it tries to call the oracle.xml.parser.v2.XSLProcessor.
    The servlet for the login screen (XSL transformation) takes XML and returns HTML. Actually for the xml parsing
    we use xerces I don't understand why we would call the ORACLE parser? Do you have any idea? Is this a CLASSPATH
    or configuration problem? Is there a way to use the xml parser xerces instead the oracle one.
    <log4j:event logger="com.siemens.srvcmgmt.common.server.PresentationHandler" timestamp="1052834094464" level="DEBUG" thread="ApplicationServerThread-5">
    <log4j:message><![CDATA[Error: ]]></log4j:message>
    <log4j:NDC><![CDATA[1 Security doPost sendLoginScreen PresentationHandler transformIt]]></log4j:NDC>
    <log4j:throwable><![CDATA[java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:375)
    at oracle.xml.parser.v2.XSLProcessor.setParam(XSLProcessor.java:658)
    at oracle.xml.jaxp.JXTransformer.setParameter(JXTransformer.java:385)
    at com.siemens.srvcmgmt.common.server.PresentationHandler.transformIt(PresentationHandler.java:149)
    at com.siemens.srvcmgmt.smc.servlet.Security.sendLoginScreen(Security.java:596)
    at com.siemens.srvcmgmt.smc.servlet.Security.doPost(Security.java:105)
    at com.siemens.srvcmgmt.smc.servlet.Security.doGet(Security.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
    at java.lang.Thread.run(Thread.java:479)
    ]]></log4j:throwable>

  • CPO XSL Transform for CPSC Form data with Grid

    Does anyone have an XSL Transform worked out that conveniently parses the CPSC Form output from Service Link when it has a grid in it?
    For example the data from CPSC Service Link might look like:
    <root>
       <Common>
          <Action ClassID="">Some Action</Action>
          <RequisitionID>123</RequisitionID>
       </Common>
       <Attributes/>
       <FormData>
          <Dictionary.Field>Some Data</Dictionary.Field>
          <DictionaryWithGrid-1.Field1>somevalue</DictionaryWithGrid-1.Field1>
          <DictionaryWithGrid-1.Field2>someothervalue</DictionaryWithGrid-1.Field2>
          <DictionaryWithGrid-1.Field3>yetanothervalue</DictionaryWithGrid-1.Field3>
          <DictionaryWithGrid-2.Field1>somevalue2</DictionaryWithGrid-2.Field1>
          <DictionaryWithGrid-2.Field2>someothervalue2</DictionaryWithGrid-2.Field2>
          <DictionaryWithGrid-2.Field3>yetanothervalue2</DictionaryWithGrid-2.Field3>
       </FormData>
    </root>
    So the desired output would be
    <Row>
       <Field1>somevalue</Field1>
       <Field2>someothervalue</Field2>
       <Field3>yetanothervalue</Field3>
    </Row>
    <Row>
       <Field1>somevalue2</Field1>
       <Field2>someothervalue2</Field2>
       <Field3>yetanothervalue2</Field3>
    </Row>
    I'm having difficulty getting the right XSL select when the tag is something like 'DictionaryWithGrid-#.Field'.
    Thanks!

    That worked great, Svetlana!  Thank you very much for the help.
    I made some slight mods to make it even more portable and intuitive for XSL/XML beginners.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <!-- Replace CHANGEME below with the name of the CPSC Form Dictionary to transform -->
    <xsl:variable name="Dictionary">CHANGEME</xsl:variable>
    <xsl:template match="root">
      <Table>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="1" />
          </xsl:call-template>
      </Table>
    </xsl:template>
      <xsl:template name="ProcessOne">
        <xsl:param name="pos" />
        <xsl:variable name="RowName" select="concat($Dictionary, '-', $pos)" />
        <xsl:if test="FormData/*[starts-with(name(), $RowName)] != ''">
          <Row>
            <xsl:for-each select="FormData/*[starts-with(name(), $RowName)]">
              <xsl:if test="starts-with(name(.), $RowName)">
                <xsl:variable name="FieldName" select="substring-after(name(.), '.')"/>
                <xsl:element name="{$FieldName}">
                  <xsl:value-of select="."/>
                </xsl:element>
              </xsl:if>
            </xsl:for-each>
          </Row>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="number($pos+1)" />
          </xsl:call-template>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

  • Issue with XSL transformation in Java Stored Procedure

    Hi,
    Am having issue applying XSL transformation in Java Stored procedure. I have loaded the java class as well as .XSL files through loadjava uility and their status in DB is VALID.
    Below is the code in the java stored procedure:
    public static String tranform(String strInputXML ){
    URL url = ClassLoader.getSystemClassLoader().getResource(first.xsl);
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new ByteArrayInputStream (strInputXML.getBytes("UTF-8")));
    TransformerFactory tFactory = TransformerFactory.newInstance();
    StreamSource stylesource = new StreamSource(url.openStream());
    Transformer transformer = tFactory.newTransformer(stylesource);
    When I run this procedure, am getting following errors:
    {color:#ff0000}*ERROR: 'No such file or directory'*
    FATAL ERROR: 'Could not compile stylesheet'{color}
    My first.xsl file has reference to other excel file (Ex: &lt;xsl:include href="second.xsl"/&gt;) which seems to be causing this error. When I remove the reference, procedure is working fine.
    Pls let me know how to resolve this and read the .XSL file with references.
    Thanks,

    Hello,
    Thanks for the reply. Actually I have seen that post before creating this thread. I thought that I could make use of java mail to work around this problem. I created a java class that succesfully sends mail to SSL host. I tried to call this java class from pl-sql through java stored procedure. That did not work
    So, is this not supported in Oracle ? Please note that I have tested this in both 9i and 11g , in both the versions I got the error. You can refer to the code in the above post.
    Thanks
    Srikanth
    Edited by: user12050615 on Jan 16, 2012 12:17 AM

  • Problems with xsl transformation

    Hi,
    I have an XSL to transform an XML to HTML code.
    I want my HTML to be ACCESSIBLE.
    All is working ok, but the <html> tag have two or three attributtes that make de code no ACCESSIBLE.
    This is a part of the XSL code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
         <xsl:output method="xhtml" version="1.0" encoding="UTF-8" indent="yes" standalone="no"/>
    <xsl:include href="barraSuperior.xsl"/>
         <xsl:include href="cabecera.xsl"/>
         <xsl:include href="menu.xsl"/>
         <xsl:include href="enllacosDestacats.xsl"/>
         <xsl:include href="contenido.xsl"/>
         <xsl:include href="barraBanners.xsl"/>
         <xsl:include href="pie.xsl"/>
         <xsl:variable name="homeWeb">http://172.16.67.119:8080/Biblioteques/xslt/V53CapSetmana</xsl:variable>
         <xsl:variable name="idioma"><xsl:value-of select="xmlData/config/idioma"/></xsl:variable>
         <xsl:variable name="literals" select="document(concat($homeWeb,'/traduccions/',$idioma,'.xml'))"/>
         <xsl:template match="/">
              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$idioma}" lang="{$idioma}">
                   <head>
                        <title>
    <body>
                        <xsl:call-template name="barraSuperior"/>
                        <xsl:call-template name="cabecera"/>
                        <div id="wrapper">                         
                             <div id="columna0">
                                  <xsl:apply-templates select="xmlData/menuLateral/contingutVignette/contingut/llista"/>
                             </div>     
                             <xsl:call-template name="contenido"/>
                        </div>
                        <xsl:call-template name="pie"/>
                   </body>
              </html>
         </xsl:template>
    </xsl:stylesheet>
    This is a part of the HTML result:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="ca" lang="ca">
         <head>
              <title>B cap de setmana</title>
    </head>
    <body>
    </body>
    I want the <html> to be like this:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ca" lang="ca">

    Use the exclude-result-prefixes attribute in your xsl:stylesheet element.

  • XSL Transformation enconding problem?

    Hi everybody.
    I have a strange problem with JDev 9.0.2.829 concerning XSL Transformation:
    I just tried to make the step from JDev 3.2.3 to 9i, imported my existing project and set up JDev 9 for use with XalanJ2 and Xerces2. Everything works fine except:
    If I transform XML data to HTML that contains characters with an ASCII code >127 the whole string appears multiple times (2x or 3x) in the generated HTML.
    The data is read from an Oracle DB with UTF8 encoding, all my stylesheets and JSPs are UTF-8 encoded. JDev9 is set to use UTF-8 encoding.
    No compilation errors, no warnings.
    The same code and stylesheets work perfectly in JDev 3.2.3, deployed into Topmcat 4.0.4 and IBM WebSphere 3.5.4.
    What am I missing?
    Thanks in advance!
    Ralf Steppacher

    OK, I found the culprit.
    The JSPWriter is broken and produces the faulty output when fed with UTF-8 encoded character data. The problem disappears when all character data is buffered in a ByteArrayOutputStream first (without a special encodung schema given) and then written as a string through the JSPWriter.
    Ralf

Maybe you are looking for

  • Satellite L300- 1AQ - Bluetooth tray application has stopped working

    When i put my laptop on it comes up with an error which says: *bluetooth tray application has stopped working* A problem caused the problem to stop working correctly. Windows will close the program and notify you if a solution is available. Anyone go

  • Error message in user Exit

    Hi friends, Iam working on sone userexit in tcode Ko01 . actually  i have to through the error message ...break point comes to that point it is not throughting that message...the message format i have used is MESSAGE msgtypemsgnumber(messageid)   WIT

  • IMac won't recognize external CD/DVD burner

    I have an iMac, Intel Core 2 Duo, OS 10.4.11. Five months ago, I purchased an external CD/DVD burner (Pioneer DVR-218L) in a multiple interface case from OtherWorldComputing. Everything worked flawlessly... I could burn iTunes CDs on that drive, usin

  • ME21N:Enhancement of Purchase Order

    Hi everyone, I want to update item of Purchase order without method 'process_item' in ME_PROCESS_PO_CUST. (I knew how to upate item of PO using process_item) But, for example, If I used MM06E005, I updated customer data only. I can't update item of P

  • New here and need help with FX1 and FCE

    Hey all - I shot a lot of video this last summer on a Sony FX1 in HDV. I am capturing the video using FCE. I have my Easy set up for HD, 29.97, and HDV - AIC 1080i60. I am in the US not using PAL. I can capture the video fine, and export to quicktime