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.

Similar Messages

  • Encoding problem with XSL

    Hi,
    I have problems when printing the result of processing XML with an XSL that contains locale specific chars.
    Here is a sample:
    XML :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ListePatients>
    <Patient>
    <Nom>Zeublouse</Nom>
    <NomMarital/>
    <Prinom>Agathe</Prinom>
    </Patient>
    <Patient>
    <Nom>Stick</Nom>
    <NomMarital>Laiboul</NomMarital>
    <Prinom>Ella</Prinom>
    </Patient>
    <Patient>
    <Nom>`ihnotvy</Nom>
    <NomMarital/>
    <Prinom>Jacques</Prinom>
    </Patient>
    </ListePatients>
    XSL :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="/">
    <HTML>
    <HEAD>
    <META http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <xsl:apply-templates select='ListePatients'/>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match='ListePatients'>
    <TABLE>
    <xsl:for-each select='Patient'>
    <xsl:sort select='Nom' order='ascending' data-type='text'/>
    <TR TITLE='`ihnotvy'>
    <TD> <xsl:value-of select='Nom'/> </TD>
    <TD> <xsl:value-of select='NomMarital'/> </TD>
    <TD> <xsl:value-of select='Prinom'/> </TD>
    </TR>
    </xsl:for-each>
    </TABLE>
    </xsl:template>
    </xsl:stylesheet>
    Test program (from Oracle sample) :
    import java.net.URL;
    import java.io.*;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XMLDocumentFragment;
    import oracle.xml.parser.v2.XSLStylesheet;
    import oracle.xml.parser.v2.XSLProcessor;
    public class XSLSampleOTN
    * Transforms an xml document using a stylesheet
    * @param args input xml and xml documents
    public static void main (String args[]) throws Exception
    DOMParser parser;
    XMLDocument xmldoc, xsldoc, out;
    URL xslURL;
    URL xmlURL;
    try
    if (args.length != 2)
    // Must pass in the names of the XSL and XML files
    System.err.println("Usage: java XSLSampleOTN xslfile xmlfile");
    System.exit(1);
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    // parser input XSL file
    xslURL = DemoUtil.createURL(args[0]);
    parser.parse(xslURL);
    xsldoc = parser.getDocument();
    // parser input XML file
    xmlURL = DemoUtil.createURL(args[1]);
    parser.parse(xmlURL);
    xmldoc = parser.getDocument();
    // instantiate a stylesheet
    XSLStylesheet xslSS = new XSLStylesheet(xsldoc, xslURL);
    XSLProcessor processor = new XSLProcessor();
    // display any warnings that may occur
    processor.showWarnings(true);
    processor.setErrorStream(System.err);
    // Process XSL
    XMLDocumentFragment result = processor.processXSL(xslSS, xmldoc);
    // print the transformed document
    result.print(System.out);
    // an other way to print, it doesn't print the same !!!!
    processor.processXSL(xslSS, xmldoc, System.out);
    catch (Exception e)
    e.printStackTrace();
    When printing the transformed document with DocumentFragment.print() it work fine but when using processXSL(xslSS, xmldoc, System.out) it don't works for locale specific chars and a second <META> balise appears, Why ?
    with DocumentFragment.print(), it's Ok :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1"/>
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="`ihnotvy">
    <TD>`ihnotvy</TD>
    <TD/>
    <TD>Jacques</TD>
    </TR >
    <TR TITLE="`ihnotvy">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Zeublouse
    </TD>
    <TD/>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    With processXSL(xslSS, xmldoc, System.out), it's not Ok :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html">
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>C C)C(C.C/C4C6C9</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    TIA
    Didier
    null

    Two other problems with XSL and print:
    first one :
    XSL :
    <SCRIPT langage="Javascript" type="text/javascript" src="scripts/erreur.js"></SCRIPT>
    DocumentFragment.print() produce :
    <SCRIPT langage="Javascript" type="text/javascript" src="scripts/erreur.js"/>
    => IE5.5 don't load the file !!, it required syntaxe like <SCRIPT ...></SCRIPT> to load.
    the second one :
    XSL:
    <TD><IMG src="images/menuleft.gif"/></TD>
    DocumentFragment.print() produce :
    <TD>
    <IMG src="images/menuleft.gif">
    </TD>
    processXSL(xslSS, xmldoc, System.out) produce :
    <TD><IMG src="images/menuleft.gif">
    </TD>
    Why a cariage return ?? it cause prisentation failure when you want to specifie the size off the cell !!
    TIA
    Didier
    null

  • Problem with CALL TRANSFORMATION xml - abap

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

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

  • Problem with x:transform function : translation with XSLT

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

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

  • 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

  • Problem with "CALL Transformation" in ABAP

    Hello All,
           I am creating XML from ABAP program and using CALL TRANSFORMATION. Everything works fine but when my XML is created sometimes in some "element" values it is truncating space between the texts. For example, I have a field "description" with value "Bon Apetite" it changes to "BonApetite" (space truncated) after transformation! I did research everywhere but could not find why this would happen! Please give me any feedback if you have any information.
    Thanks.
    Mithun

    Hello Mithun,
    when you use the call transformation statement you have to specifiy the xslt transformation used. As a first step you usually use the transformation with the name ID. This is a special transformation for making the asXML representation of abap data. Unfortunately if you look into this transformation you find the following:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:transform>
    If I remember correctly when you use another transformation this will first call the ID transformation and after this the specified one. So it should not be possible to just copy ID transformation and remove the line. I'll have to think again how to avoid the behaviour.
    Best Regards
    Roman

  • Problem with xsl:template and call-template

    Hi
    in XSQL i am getting one row like this
    <REASON_FOR_REJECTION>1.Overhead line is not existing in front of the premises,2.The distance from the pole to the serice is more than 30 meters.,3.Another service is existing in the same premises with arrears.</REASON_FOR_REJECTION>
    In the above String for every comma i want to put <br>
    the output should come like this:
    1.Overhead line is not existing in front of the premises
    2.The distance from the pole to the serice is more than 30 meters.
    3.Another service is existing in the same premises with arrears
    i have written xsl like this;i am getting this error;
    XSQL-011: Error processing XSLT stylesheet: ../xsl/CMS48_RejectionLetter1.xsl
    (Error) Template 'ROWSET/ROW/REASON_FOR_REJECTION' invoked but not defined.
    wat's wrong with this code?
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java" version="1.0">
    <xsl:template match="/">
    <html>
    <body Class='Ecrm_Body'>
    <xsl:apply-templates/>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="ROW">
    <p>
    <xsl:apply-templates select="REASON_FOR_REJECTION"/>
    </p>
    </xsl:template>
    <xsl:template match="REASON_FOR_REJECTION">
         <xsl:param name="REASON_FOR_REJECTION"/>
    <xsl:variable name="year"
    select="substring-before(.,',')"/>
    <xsl:choose>
    <xsl:when test="string-length($year) > 0">
    <td><xsl:value-of select="$year"/></td>
         <xsl:call-template name="ROWSET/ROW/REASON_FOR_REJECTION">
    <xsl:with-param name="REASON_FOR_REJECTION">
              <xsl:value-of select="substring-after($REASON_FOR_REJECTION,',')"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <td><xsl:value-of select="$REASON_FOR_REJECTION"/></td>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>

    <xsl:call-template name="ROWSET/ROW/REASON_FOR_REJECTION">
    This looks for a template defined like this:
    <xsl:template name="ROWSET/ROW/REASON_FOR_REJECTION">
    not one defined like this:
    <xsl:template match="ROWSET/ROW/REASON_FOR_REJECTION">

  • Problem with xsl:template

    Hi
    in XSQL i am getting one row like this
    <REASON_FOR_REJECTION>1.Overhead line is not existing in front of the premises,2.The distance from the pole to the serice is more than 30 meters.,3.Another service is existing in the same premises with arrears.</REASON_FOR_REJECTION>
    In the above String for every comma i want to put <br>
    the output should come like this:
    1.Overhead line is not existing in front of the premises
    2.The distance from the pole to the serice is more than 30 meters.
    3.Another service is existing in the same premises with arrears
    i have written xsl like this;i am getting this error;
    XSQL-011: Error processing XSLT stylesheet: ../xsl/CMS48_RejectionLetter1.xsl
    (Error) Template 'ROWSET/ROW/REASON_FOR_REJECTION' invoked but not defined.
    wat's wrong with this code?
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java" version="1.0">
    <xsl:template match="/">
    <html>
    <body Class='Ecrm_Body'>
    <xsl:apply-templates/>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="ROW">
    <p>
    <xsl:apply-templates select="REASON_FOR_REJECTION"/>
    </p>
    </xsl:template>
    <xsl:template match="REASON_FOR_REJECTION">
         <xsl:param name="REASON_FOR_REJECTION"/>
    <xsl:variable name="year"
    select="substring-before(.,',')"/>
    <xsl:choose>
    <xsl:when test="string-length($year) > 0">
    <td><xsl:value-of select="$year"/></td>
         <xsl:call-template name="ROWSET/ROW/REASON_FOR_REJECTION">
    <xsl:with-param name="REASON_FOR_REJECTION">
              <xsl:value-of select="substring-after($REASON_FOR_REJECTION,',')"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <td><xsl:value-of select="$REASON_FOR_REJECTION"/></td>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>

    i made this change <xsl:call-template name="ROWSET/ROW/REASON_FOR_REJECTION"> to <xsl:call-template name="REASON_FOR_REJECTION"> and
    <xsl:template match="ROWSET/ROW/REASON_FOR_REJECTION"> to
    <xsl:template name="ROWSET/ROW/REASON_FOR_REJECTION"> ;
    but it is not going into 2nd template whyy??

  • 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>

  • 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.

  • Problem With Match Transformation

    Hi ,
    I am using Match transformation to find the duplicates .
    My input data like this
    EMP NO     ENAME         SAL     DEPTNO
    10     SRIRAM MV  10000     100
    11     MV SRIRAM  11000     100
    12     SRIRAM PV  11000     100
    13     SRIHARI       11000     100
    14     SUBBIAH       11000     100
    15     RAMANA       11000     100
    Iam finding the duplicates on Ename .
    My ename data like SRIRAM MV, MV SRIRAM  like that data . both are duplicate records . for that iam using WORD SIMILARITY  option instead of field similarity with match score is 100 and no match score is 99.
    But i am getting all are unique records .
    If i am using match score is 85 and no match  score is 84 then iam getting the result like this .
    EMP NO     ENAME     SAL     DEPTNO     GROUP_NUMBER     MATCH_STATUS     MATCH_SCORE
    11     MV SRIRAM     11000     100     1     P     94
    15     RAMANA     11000     100          U     
    13     SRIHARI     11000     100          U     
    10     SRIRAM MV     10000     100     1     D     
    12     SRIRAM PV     11000     100     1     P     88
    14     SUBBIAH     11000     100          U     
    means MV SRIRAM,SRIRAM MV ,SRIRAM PV  comes under one group number with SRIRAM MV  as driver and MV SRIRAM as passenger with 94 similarity score and  SRIRAM PV as passenger with 88 score.
    While i am using the match score i need to get 100% per SRIRAM MV and MV SRIRAM . then whats the settings needed to get correct result. whats the problem with my settings.
    Please help me out to solve the problem
    Thanks&Regards,
    Ramana.

    Ramana,
    <<< My ename data like SRIRAM MV, MV SRIRAM like that data . both are duplicate records . for that iam using WORD SIMILARITY option instead of field similarity with match score is 100 and no match score is 99. >>>
    You are looking for an exact match here, but MV SRIRAM and SRIRAM MV are not exactly the same.  The characters MV are in different positions.  The Word Similarity option compares words instead of the entire field, but the character position also affects the match score.
    <<< While i am using the match score i need to get 100% per SRIRAM MV and MV SRIRAM . >>>
    You cannot force the the match score to be a specific value.  SRIRAM MV and MV SRIRAM are not a 100% match and never will be.  What you need to do is adjust the match settings so that the dupe group includes SRIRAM MV and MV SRIRAM but excludes SRIRAM PV.  Try Match Score = 90 and No Match Score = 89.

  • Problem with XSLT Transformation on BPM

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

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

  • 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 !

  • XMLForm problem with XSL Stylesheet

    Hello all,
    I've been asked to have a look at a problem that a friend is having with XMLForms. They have recently upgraded to NW04 SP11 (from NW04 SP9) and now they cannot 'Create New' for each of the XML forms that they based on 'SAP Demo News'. They also cannot create new 'SAP Demo News'.
    In each of their *Edit.xsl forms there is the line
    <xsl:include href="wcm://etc/xmlforms/htmledit/htmledit.xsl" />
    When they try to 'Create New' for any of these forms they get the following error
    com.sapportals.wcm.WcmException:
    Could not load stylesheet.com.sap.engine.lib.xml.util.NestedException:
    Could not resolve: 'wcm://etc/xmlforms/htmledit/htmledit.xsl'
    base: '/etc/xmlforms/Company_General/Company_GeneralEdit.xsl'
    -> javax.xml.transform.TransformerException:
    Error downloading from URL: wcm://etc/xmlforms/htmledit/htmledit.xsl,
    No user in context
    that is just the first line but I believe that it is the important line. The portal seems to be unable to access 'htmledit.xsl' and perhaps because there is no user in context.
    Has anyone come across this or know of a solution?
    Thanks in advance,
    Patrick.
    EDIT.
    I see that this is directly related to having a HTML Editor on the form. When I remove that component the form works, when I re-add that component it all falls over again.
    Any ideas?

    Hi Patrick,
    I got a response from SAP. The problem was that there were two anonymous users both in ADS and in the DB.
    The following procedure fixed it:
    The problem is that there are 2 anonymous users both in DB as in ADS.
    To solve this, please add the following entries in the ConfigTool, UME
    LDAP data, Additional LDAP properties:
    ume.ldap.blocked_users(global) = ....,anonymous
    ume.ldap.blocked_accounts(global) = ....,anonymous
    Restart the engine if already started.
    These changes force to use the user “anonymous” from the DB.
    Hope this helps for you!
    Thanks for rewarding!
    Markus

  • Problems with xml transformation via xslt - strange results

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

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

Maybe you are looking for

  • Analog Signal to Digital a Primer

    Many users have analog material sitting around, and they would like to get it into digital form, so that it can be edited. As this material is below SD (Standard Definition) quality, I will address the methods for digitizing it, so that it can be bes

  • Total no of records in a recordset?

    I creating an application in which I send a query to database. Then loop through the ResultSet object and increment a counter to find the total no. of records in it, and then a generate JLabel array equal to the size of counter which is application's

  • Query Designer - How to compare 2 non-numeric characteristics?

    Hi, In a BW query, I would like to display all materials sold for which the country of the sold-to is different of the country of the ship-to. Both of these characteristics (countries) are available in the cube like navigation attributes. I cannot mo

  • How can I determine which generation my Apple TV device is ?

    How can I determine which generation my Apple TV device is?

  • Upgrading secure zone

    Hi all, I am looking to create a free trial secure zone and let users upgrade to a paid secure zone after 2 months. When i pre-populate the fields with their username and email (the user will be logged into their trial account to access this form), w