Rendering xforms in xslt

Hi people,
i have to change my html-form tags to xform tags in my xsl-file. i have added the xform namespace and changed the html-tags to xform-tags. and added <object id="FormsPlayer".. like in xhtml. but after transforming i dont get the form. i really couldn't find anything about it on the web. it is always about xhtml. can any body give me a link or a tip to begin??
i am sending now the original version with html-form.
thanx in advance
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/2002/06/xhtml2">
<xsl:param name="format"></xsl:param>   
<xsl:param name="e_anfang"></xsl:param>
<xsl:param name="e_anzahl"></xsl:param>
<xsl:template match="page">
<html>
<head><title>Cocoon - MA.BS.KY.CK</title></head>
<body bgcolor="#CCFFFF">
<h1 align="center" style="font-family:arial; font-size:30pt; color:#000066 ">Cocoon Projekt - Gruppe MA.BS.KY.CK</h1>
<xsl:apply-templates/>
<div style="text-align:left; padding:20px;  margin:25px; position:relative; left:0; top:0;background-color:#BDEDFF;
position:relative; left:0; top:0;height:100; width:%100;border:thin solid lightblue;">
<p style="position: absolute; left:0; top:0;font-size:23pt; font-weight:bold; color:darkblue;font-family:arial;font-style:italic">Tagebuch</p>
<br></br><br></br><br></br>
<div style="background-color:#B4CFEC">
<br></br>
<p id="t2">2-  Welches �bungsblatt wollen Sie sehen?</p>
<form action="ausgabe">
<select name="e_anfang">                   
<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option>
</select> 
<select name="format">
<option>pdf</option><option>html</option>
</select>
<input name="e_anzahl" type="hidden" value="1"></input>
<input type="submit" value="OK"></input>       
</form>
<br></br>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

i dont get the formCan you be more specific about what this means?

Similar Messages

  • Unable to refer to custom resource bundle in WPC content rendered with xslt

    Hi,
    I need to use the resource bundle messages inside WPC content.
    When rendered by standard xsl templates the  call to XSLTHelper class is done to retrieve message from the standard SAP resource bundle com.sap.nw.wpc.bundles.core.properties, like this:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                         xmlns:wpc="com.sap.nw.wpc.km.service.editor.hslt.XsltHelperCore">
    <xsl:value-of select="wpc:getString([key defined in sap bundle], string(/document/@locale))"/>
    The problem is that helper class doesn't provide any API to use custom bundles.
    I tried to create xslt helper (including config in KM), but that didn't succeed neither. It would return with error NoClassDefFound.
    Could you please help on configuring xslt helper and registering it with xslt rendering engine for Web Page Composer? I could not find any how-to guides on xslt helpers for WPC.
    Thanks in advance.
    Ruslan

    Hi
    Did you find a solution?
    Christof

  • Problem in rendering the XML using  XSLT in Netscape 7

    Hi there,
    I have used the XSLT to generate HTML codes from the XML datafiles.
    It works fine in Internet Explorer, but when I tried it on Netscape
    7.0 , it just displayed the xml data, without the tags..
    For example,
    In the xml ,I have the following :
    <id>11111111111111112</id>
    <name>adegf1</name>
    <date>Mar 24 2003Jan 01</date>
    In the IE, it was transformed into the html perfectly but
    when i used Netscape 7.0, it was displayed as the following in a single
    line:
    11111111111111112adegf1Mar 24 2003Jan 01
    Can anybody tell me how to overcome this ? Does the problem lie in the xml or the xslt ? I am using XSL Transform version 1.0 and XML version 1.0.
    Thanks in advance !
    Kirk

    Hello,
    The generated XML refers to the XSLT which is in the server.
    So, the browser's parsers affects the output..
    Any sugestions ?
    Thanks !

  • XSLT - inserting new line character

    Hi, hoping somebody could help me please.
    I'm attempting in 10g to convert a XML purchase-order with multiple detail lines to a CSV delimited output using an XSLT to undertake the transformation. Each line of the purchase-order, namely the header and each detail line must go on separate lines within the CSV file. This means each line must be clearly terminated with a CR-LF.
    While I can happily convert the XML purchase-order to CSV format, my experiments in inserting a CR-LF have failed, resulting in all lines collapsed onto one large line.
    According to various sources on the Net, inserting the following entry in my XSLT file should generate the new line that I'm looking for:
    <xsl:text>ampersand#xa;</xsl:text>(In the above code replace the text "ampersand" with an actual & - I'm unable to display the proper ampersand hash value xa as this HTML page renders it as newline character)
    However with no success.
    The sample program below shows the conversion process. Anybody any idea on why I'm not seeing the output with new lines?
    Your help appreciated.
    CM.
    DECLARE
    v_xml XMLType;
    v_xml2 XMLTYPe;
    v_xslt XMLType;
    BEGIN
    v_xml := XMLType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <PurchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.xxxx.com.au/schemas/gatewayPurchaseOrder.xsd gatewayPurchaseOrder.xsd"
    xmlns="http://www.xxxx.com.au/schemas/gatewayPurchaseOrder.xsd">
    <Header>
    <GatewayPurchaseOrderNo>1234</GatewayPurchaseOrderNo>
    <PharmacyReference>2345</PharmacyReference>
    </Header>
    <Detail>
    <ProductNo>9876</ProductNo>
    <APNNo>7654</APNNo>
    </Detail>
    <Detail>
    <ProductNo>8888</ProductNo>
    <APNNo>7777</APNNo>
    </Detail>
    </PurchaseOrder>');
    v_xslt := XMLType(
    '<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.xxxx.com.au/schemas/gatewayPurchaseOrder.xsd">
    <xsl:output method="text"/>
    <xsl:template match="/PurchaseOrder/Header">
    <xsl:value-of select="normalize-space(GatewayPurchaseOrderNo)"/>,<xsl:value-of select="normalize-space(PharmacyReference)"/>
    <xsl:text>ampersand #xa;</xsl:text>
    </xsl:template>
    <xsl:template match="/PurchaseOrder/Detail">
    <xsl:value-of select="normalize-space(ProductNo)"/>,<xsl:value-of select="normalize-space(APNNo)"/>
    <xsl:text>ampersand#xa;</xsl:text>
    </xsl:template>
    </xsl:stylesheet>');
    v_xml2 := v_xml.transform(v_xslt);
    dbms_output.put_line(v_xml2.getclobval);
    END;(In the above code replace the text "ampersand" with an actual & - I'm unable to display the proper ampersand hash value xa as this HTML page renders it as newline character)

    I don't know much about XSLT yet, but tickeled by the problem, after wandering over the internet and found stuff like this - http://forums.devshed.com/xml-programming-19/cannot-output-crlf-xslt-348042.html - I constructed the following...
    SQL> set serveroutput on size 50000
    SQL> DECLARE
       v_xml XMLType;
       v_xml2 XMLTYPe;
       v_xslt XMLType;
    BEGIN
       v_xml := XMLType(
          '<?xml version="1.0" encoding="UTF-8"?>
          <PurchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.xxxx.com.au/schemas/gatewayPurchaseOrder.xsd gatewayPurchaseOrder.xsd"
             xmlns="http://www.xxxx.com.au/schemas/gatewayPurchaseOrder.xsd">
             <Header>
                <GatewayPurchaseOrderNo>1234</GatewayPurchaseOrderNo>
                <PharmacyReference>2345</PharmacyReference>
             </Header>
             <Detail>
                <ProductNo>9876</ProductNo>
                <APNNo>7654</APNNo>
             </Detail>
             <Detail>
                <ProductNo>8888</ProductNo>
                <APNNo>7777</APNNo>
             </Detail>
          </PurchaseOrder>');
          v_xslt := XMLType(
             '<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns="http://www.xxxx.com.au/schemas/gatewayPurchaseOrder.xsd">
             <xsl:output method="text"/>
             <xsl:template match="/PurchaseOrder/Header">
                <xsl:value-of select="normalize-space(GatewayPurchaseOrderNo)"/>,<xsl:value-of select="normalize-space(PharmacyReference)"/>
                <xsl:text>AMPERSAND#xa0;AMPERSAND#xa;</xsl:text>
             </xsl:template>
             <xsl:template match="/PurchaseOrder/Detail">
                <xsl:value-of select="normalize-space(ProductNo)"/>,<xsl:value-of select="normalize-space(APNNo)"/>
                <xsl:text>AMPERSAND#xa0;AMPERSAND#xa;</xsl:text>
             </xsl:template>
             </xsl:stylesheet>');
       v_xml2 := v_xml.transform(v_xslt);
       dbms_output.put_line(v_xml2.getclobval);
    END;
    SQL>
    1234,2345
    9876,7654
    8888,7777
    PL/SQL procedure successfully completed.So first one space and then the CR-LF.
    Hope this helps?
    Message was edited by:
    mgralike

  • Modify HTML of the document of the rendered page and reload

    Currently i am loading a url in javafx through webengine.load(url). My requirement is to keep the styling in tact with the original page. However, once the page is rendered, the fonts are not loaded and i am unable to increase the font sizes. I worked through the following steps to achieve this.
    1. Add a listener through getLoadWorker method for web engine and get the document object when the state is SUCCEEDED.
    2. Transform the document to a html string which gives me the whole HTML of the page in a string including the css.
    3. Then i do a replace on the css part with the actual location of the font files (absolute path url) and reload the html through loadContent method.
    With this, i am able to get the fonts loaded properly.
    Problem:
    1. I end up with a infinite loop when i use the "webEngine.loadContent(string, "text/html")" inside the getLoadWorker method.
    2. I tried to do that outside the getLoadWorker method before the webEngine.load(url) but in this case the replace html body string is coming as null.
    Any help on how to achieve this?? Below is my code:
          webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
                String htmlBody = null;
                @Override
                public void changed(ObservableValue<? extends Worker.State> observableValue, Worker.State prevState, Worker.State newState) {
                    //To change body of implemented methods use File | Settings | File Templates.
                    //String htmlBody = null;
                    int count = 0;
                    if (newState == Worker.State.SUCCEEDED) {
                        browser.requestFocus();
                        // Get the document object from Engine.
                        Document doc = webEngine.getDocument();
                        try {
                            // Use Transformer to convert the HTML Object from the document top String format.
                            Transformer transformer = TransformerFactory.newInstance().newTransformer();
                            transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
                            transformer.setOutputProperty(OutputKeys.METHOD, "html");
                            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                            transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
                            StringWriter outWriter = new StringWriter();
                            transformer.transform(new DOMSource(doc),new StreamResult(outWriter));
                            StringBuffer sb = outWriter.getBuffer();
                            htmlBody = sb.toString();
                            // Replace the font-family attribute in the style section to the actual URL of the font being used.
                            htmlBody = htmlBody.replace("font-family: medium", "font-family: url(http://1.10.30.45:8080/fonts/Md.ttf)");
                            // Load the new HTML string to the Engine.
                            //webEngine.loadContent(htmlBody, "text/html");
                        } catch (Exception ex) {
                            ex.printStackTrace();
            webEngine.load(url);
            //add the web view to the scene
            getChildren().add(browser);

    James,
    I tried the document manipulation but was unable to override the css that was already applied. I downloaded and used jdk 8 which has the latest version of javaFX which fixed the font loading issue. Now i can see all the custom fonts and everything getting loaded as part of css.
    However, when i try to capture the state of the worker, it stays in the running and not changing to success. First few instances, the page was loaded successfully but then it stopped. Any idea if this is due to the new javaFX version of jdk8? Below is the code snippet:
           webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
                @Override
                public void changed(ObservableValue<? extends Worker.State> observableValue, Worker.State prevState, Worker.State newState) {
                    //To change body of implemented methods use File | Settings | File Templates.
                    System.out.println(newState);
                    if (newState == Worker.State.SUCCEEDED) {
                        browser.requestFocus();
                        // Get the document object from Engine.
                        Document doc = webEngine.getDocument();
                        System.out.println(doc.getDocumentURI());
            webEngine.load(url);
            //add the web view to the scene
            getChildren().add(browser);
    The output is
    SCHEDULED
    RUNNING
    and nothing after that...

  • XSLT and html

    Ok..losing my mind here. Running on 11.2.0.2 AIX
    I have an xslt to generate html document. Some of the html will be provided by an end-user... which I will embed into the xslt, to create one final template. Some problems I'm having:
    - br tags... no matter what I try, can't seem to prevent the transform from outputting
    <br></br>The issue is this is causing double line-breaks when rendered in a browser or email client (using this to generate html emails)
    Example:
    declare
    l_xml xmltype;
    l_html_part clob;
    begin
    l_xml := xmltype('<content>This is a test</content>');
    SELECT  XMLSerialize(document XMLtransform(l_xml , xmltype('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes"/>
      <xsl:template match="/">
        <html><body>
    <p><xsl:value-of select="content" /></p>
    <blockquote>
    Some text <br/>
    on muliple <br/>
    lines<br/>
    here.
    </blockquote>
          </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>')) as clob) into l_html_part from dual;
    p.l(l_html_part);
    end;Generates the following:
    <html><body><p>This is a test</p><blockquote>
    Some text <br></br>
    on muliple <br
    </br>lines<br></br>
    here.
    </blockquote></body></html>I've tried changing the method output from html to xml... but to no avail.
    Now given I'm accepting html input from end users to embed into my xslt (enabling end users to customize the html template), any other issues I should guard against? I plan on using a wysiwyg javascript editor on the front end, to tidy the html input as much as possible, so it's well-formed. However, dealing with entities, and URLs means I may have to scrub the html a little further?
    For instance, URLs will sometimes contain & in the query string... and parameter values... one has to be escaped to &amp; while the other URL encoded..
    Thanks for any tips or advice.
    Stephane
    Edited by: pl_sequel on Feb 9, 2012 3:04 PM
    Edited by: pl_sequel on Feb 9, 2012 3:05 PM

    Thanks for that... I missed that keyword in the docs.
    The embedding of the user supplied html will be done using regexp_replace most likely.
    The design I am going with, is an html template stored in a clob, with various "merge tags" defined in the body.
    for example:
    <html>
    <body>
    <p>This is a test. Hi *|FIRSTNAME|*</p>
    *|CONTENT|*
    </body>
    </html>User will supply the html:
    <p>This is the user html content</p>I will then replace the *|CONTENT|* in the body with the user-supplied html:
    <html>
    <body>
    <p>This is a test. Hi *|FIRSTNAME|*</p>
    <p>This is the user html content</p>
    </body>
    </html>At this point, I now take the final html template, and turn it into an XSLT. Any remaining merge tags, get replaced with appropirate xsl:value-of statements as well..
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" />
    <xsl:template match="/">
    <html>
    <body>
    <p>This is a test. Hi <xsl:value-of select="FIRSTNAME" /></p>
    <p>This is the user html content</p>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>I will then have the respective xml data transformed using this stylesheet.
    Kinda creating a custom templating engine... to enable users to merge in custom data (which is already stored in the DB) and customize the template content. The final transformed html will be used to send as an html email.

  • XSLT with large file size

    Hello all,
    I am very new to XSL. I have been reading a lot on it. I have a small transformation program which takes an xml file, an xsl file and performs the transformation. Everything works fine when the file size is in terms of KB. When I tried the same program with the file size of around 118MB, it is giving me out of memory exception. I would appreciate any comments to make my program work for bigger file size. I am posting my java code and xsl file
    public static void xsl(String inFilename, String outFilename, String xslFilename) {
    try {
    // Create transformer factory
    TransformerFactory factory = TransformerFactory.newInstance();
    // Use the factory to create a template containing the xsl file
    Templates template = factory.newTemplates(new StreamSource(
    new FileInputStream(xslFilename)));
    // Use the template to create a transformer
    Transformer xformer = template.newTransformer();
    // Prepare the input and output files
    Source source = new StreamSource(new FileInputStream(inFilename));
    Result result = new StreamResult(new FileOutputStream(outFilename));
    // Apply the xsl file to the source file and write the result to the output file
    xformer.transform(source, result);
    } catch (FileNotFoundException e) {
    System.out.println("Exception " + e);
    } catch (TransformerConfigurationException e) {
    // An error occurred in the XSL file
    System.out.println("Exception " + e);
    } catch (TransformerException e) {
    // An error occurred while applying the XSL file
    // Get location of error in input file
    SourceLocator locator = e.getLocator();
    int col = locator.getColumnNumber();
    int line = locator.getLineNumber();
    String publicId = locator.getPublicId();
    String systemId = locator.getSystemId();
    System.out.println("Exception " + e);
    System.out.println("locator " + locator.toString());
    System.out.println("line : " + line);
    System.out.println("col : " + col);
    System.out.println("No Exception");
    xsl file :
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="/">
    <xsl:element name="Hosts">
    <xsl:apply-templates select="//maps/map/hosts"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="//maps/map/hosts">
    <xsl:for-each select="*">
    <xsl:element name="host">
    <xsl:element name="ip"><xsl:value-of select="./@ip"/></xsl:element>
    <xsl:element name="known"><xsl:value-of select="./known/@v"/></xsl:element>
    <xsl:element name="targeted"><xsl:value-of select="./targeted/@v"/></xsl:element>
    <xsl:element name="asn"><xsl:value-of select="./asn/@v"/></xsl:element>
    <xsl:element name="reverse_dns"><xsl:value-of select="./reverse_dns/@v"/></xsl:element>
    </xsl:element>
    </xsl:for-each>
    </xsl:template>
    Thanks,
    Namrata
    </xsl:stylesheet>

    One thing you could try to do is avoid using xpath like ".//" and "*".
    I had many problems in terms of memory consuptiom and performance with xpaths like above.
    Altrought you have a little more work to code your xslt it performs better, and probably you will write once and run many times.

  • XSLT Transformation - using variables in title name

    Hi,
    Is there a way to set the title attribute of a table tab in XSLT dynamically through xslt? I'm trying to display sections of code which have the title hardcoded and are present in the xml being rendered. I need the title of that section determined dynamically while parsing through the object nodes of the xml.
    Example:
    <table id="Table ID" title="/Object1/attribute1/name" columnCount="3" seqNo="1">
    instead of hardcoding the title name in the XSLT can we pull the name and set it from the xml being processed?
    Thanks,
    Pavan

    <section id="CALCULATION" title="Calculation">
                   <table id="CALCULATION" title="ClientName Calculation Information" columnCount="3" seqNo="1">
                        <xsl:for-each select="//returnableObjects/IntermediateResultsJB/IntermediateResultJB">
                             <xsl:if test="resultSetName[.='Client Name Calculation Information']">
                                  <xsl:variable name="Variable1" select="resultName"/>
                                  <xsl:variable name="Variable2" select="resultValue"/>
                                  <!--<xsl:variable name="Variable3" select="resultOrder"/>-->
                                  <detailRow>
                                       <!-- <cell type="string">
                                            <xsl:value-of select="$Variable3"/>
                                       </cell> -->
                                       <cell type="string">
                                            <xsl:value-of select="$Variable1"/>
                                       </cell>
                                       <cell type="number">
                                            <xsl:value-of select="$Variable2"/>
                                       </cell>
                                  </detailRow>
                             </xsl:if>
                        </xsl:for-each>
                   </table>
    </section>This is the XSLT above being used. "ClientName Calculation Information" is hardcoded in the xml that is being rendered.
    XML Fragment is given below:
    <IntermediateResultJB>
                      <resultSetName>ResultSetName1</resultSetName>     
         <resultName>Name</resultName>
         <resultValue>Value</resultValue>
         <resultOrder>1</resultOrder>
    </IntermediateResultJB>
    <IntermediateResultJB>
         <resultSetName>ResultSetName2</resultSetName>
         <resultName>Name</resultName>
         <resultValue>Value</resultValue>
         <resultOrder>2</resultOrder>
    </IntermediateResultJB>
    <IntermediateResultJB>
         <resultSetName>ResultSetName3</resultSetName>
         <resultName>Name</resultName>
         <resultValue>Value</resultValue>
         <resultOrder>3</resultOrder>
    </IntermediateResultJB>I want the XSLT above to use the <resultSetName> value["ClientName Calculation Information" e.g] to be set in the value of the title attribute of the <table> as well as <section>.
    Thanks,
    Pavan
    Edited by: EJP on 23/05/2012 10:08: code tags.

  • JavaServlet + xslt problem

    Hi.
    I am developing a web application using Javaservlet technology. The application reads an xml document and then invokes an XSLT stylesheet to transform it into XForms doc. However, the xslt processor initiates the instance data just fine. Then the browser returns an unexpected error says:
    fi.hut.tml.xsmiles.content.XSmilesContentInitializeException: fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsBindingException: Node: xforms:bind binding failed. &hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip;..
    In addition, the same xml with the same xslt stylesheet on the same Web browser will be transformed correctly without any error messages or bugs if it was invoked in the browser directly out of Javaservlet environment.
    Any clue?
    You help is much appreciated

    Hi Irene
    Use this for newline.
    <xsl:text>
    </xsl:text>
    cheers
    Sameer
    PS: If you found the answer useful, do reward points.

  • Default XSLT Stylesheet to transform BW XML Data?

    I'm currently working on a deafult XSLT Stylesheet to convert a BW XML Query Result Set into an html grid.
    [code]
    <!--
    #==========================================================================
    XSL Transformation that displays
    Template Properties, List of Data Providers and List of Items
    #==========================================================================
    -->
    <xml id="xsl_transform_1">
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:variable name="header">
    <tr bgcolor="white"> <xsl:for-each select="//RRWS_SX_TUPLE[1]/*">
      <td>
      <xsl:value-of select="local-name()"/>
      </td>
    </xsl:for-each>
    </tr>
    </xsl:variable>
    <xsl:template match="/">
    <table bgcolor="gold" border="1">
    TESTVALUE -
    <tr>
      <xsl:copy-of select="$header" /> <xsl:apply-templates />
    </tr>
    <xsl:for-each select="//RRWS_SX_TUPLE">
          <tr>
            <td><xsl:value-of select="TUPLE_ORDINAL"/></td>
              <xsl:for-each select="//RRWS_S_CELL">           
              <td><xsl:value-of select="CELL_ORDINAL"></td>
              </xsl:for-each>
            <td><xsl:value-of select="TUPLE_ORDINAL"/></td>
            <td><xsl:value-of select="CHANM"/></td>
            <td><xsl:value-of select="CAPTION"/></td>
            <td><xsl:value-of select="CHAVL"/></td>
            <td><xsl:value-of select="CHAVL_EXT"/></td>
            <td><xsl:value-of select="NIOBJNM"/></td>
            <td><xsl:value-of select="TLEVEL"/></td>
            <td><xsl:value-of select="DRILLSTATE"/></td>
            <td><xsl:value-of select="OPT"/></td>
            <td><xsl:value-of select="SIGN"/></td>                    
            <td><xsl:value-of select="ATTRIBUTES"/></td>     
          </tr>
    <xsl:for-each select="//RRWS_S_CELL">
         <tr>     
            <td><xsl:value-of select="CELL_ORDINAL"/></td> 
            <td><xsl:value-of select="VALUE"/></td>            
            <td><xsl:value-of select="FORMATTED_VALUE"/></td> 
            <td><xsl:value-of select="VALUE_TYPE"/></td> 
            <td><xsl:value-of select="CURRENCY"/></td> 
            <td><xsl:value-of select="UNIT"/></td> 
            <td><xsl:value-of select="MWKZ"/></td> 
            <td><xsl:value-of select="NUM_SCALE"/></td> 
            <td><xsl:value-of select="NUM_PREC"/></td> 
            <td><xsl:value-of select="CELL_STATUS"/></td> 
            <td><xsl:value-of select="BACK_COLOR"/></td> 
         </tr>
    </xsl:for-each>
    </table>
    </xsl:template>
    <xsl:template match="RRWS_S_CELL/*">
    <td> <xsl:value-of select="." /> </td>
    </xsl:template></xsl:stylesheet>
    </xml>
    [/code]
    I've started this, but I need to join the top tree with the bottom. Right now I'm just flattening the tree. Does anyone know if any work has been done in this area? I'm looking to create these XSLT Transforms. Also, I'd like to create generic javascript functions that I can use as an include, such as
    function join_BW_Table(table1, table2, fieldtojoin, typeofjoin)
    This would allow anyone to generically combine BW Data from multiple sources all on the FrontEnd and render it all as an html table. My ultimate goal would be have all this in includes and available for all BW Reporting. Anyone have any thoughts on:
    1. Has this been done before?
    2. If it hasn't, anyone have comments on how I can combine the 2 tables that I'm rendering with the attached XSLT transform?
    I'm running these transforms via a javscript function on the load of the html page.
    Prakash

    Prakash,
    did you ever compile the Stylesheet?  I am looking for an alternative way to format the pre-compiled XML file from the Report Designer.  The more complex my report is, the less robust the application becomes.
    Your insight would be greatly appreciated.
    Thank you

  • XSLT page refresh issue on updating xml

    hi,
    my application involves rendering of xml through XSLT on ah HTML page.
    i am using XMLTransformer in servlet i.e.
    transformer.transform( new StreamSource(tempXmlFile),
    new StreamResult(outputHtmlFile));
    response.sendRedirect(request.getContextPath() + "/logDetailXsl.html");
    and then i redirect the servlet to html page where html page is built through xslt therefore no meta tags or scriplets can be made.
    problem is that html page is not updated. i have used javascript for refresh but it doesnot work either.
    i m new using xslt so can not identify if the problem is with xslt or html page!
    pointers appreciated!

    hi,
    my application involves rendering of xml through XSLT on ah HTML page.
    i am using XMLTransformer in servlet i.e.
    transformer.transform( new StreamSource(tempXmlFile),
    new StreamResult(outputHtmlFile));
    response.sendRedirect(request.getContextPath() + "/logDetailXsl.html");
    and then i redirect the servlet to html page where html page is built through xslt therefore no meta tags or scriplets can be made.
    problem is that html page is not updated. i have used javascript for refresh but it doesnot work either.
    i m new using xslt so can not identify if the problem is with xslt or html page!
    pointers appreciated!

  • XSLT Issue to open URL in new tab and PopUp Window through one custom style

    I have SharePoint Online Custom List that contains two columns
    Name: Single Line of Text
    URL: Hyperlink or pictures
    Using XSLT I have shown Name columns value on my home page by using below custom style in
    Itemstyle.xsl file.
    Custom style to show Link in PopUp window   itemstyle.xsl
    <xsl:template name="OpenApplicationPagePopUp" match="Row[@Style='OpenApplicationPagePopUp']" mode="itemstyle">
    <xsl:variable name="SafeLinkUrl">
    <xsl:call-template name="OuterTemplate.GetSafeLink">
    <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
    </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="DisplayTitle">
    <xsl:call-template name="OuterTemplate.GetTitle">
    <xsl:with-param name="Title" select="@Title"/>
    <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
    </xsl:call-template>
    </xsl:variable>
    <div class="item link-item">
    <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
    <a href="{$SafeLinkUrl}" onclick="ShowPopupDialog(GetGotoLinkUrl(this));return false;">
    <xsl:if test="$ItemsHaveStreams = 'True'">
    <xsl:attribute name="onclick">
    <xsl:value-of select="@OnClickForWebRendering"/>
    </xsl:attribute>
    </xsl:if>
    <xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">
    <xsl:attribute name="onclick">
    <xsl:value-of disable-output-escaping="yes" select="$OnClickTargetAttribute"/>
    </xsl:attribute>
    </xsl:if>     
    <xsl:value-of select="$DisplayTitle"/>
    </a>
    </div>
    </xsl:template>
    My Requirement to show only Suggestion Box in Popup window Other Links Should be open in new Tab So please suggest me what can change in above xslt...
    Thanks
    Deepak Chauhan
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

    Hi,
    In SharePoint 2013, we can use JSLink to achieve it.
    1. Save the following code as a js file (URLPopup.js) and upload it into the
    SiteAssets Document Library.
    // List View – Field open modal dialog Sample
    (function () {
    // Create object that have the context information about the field that we want to change it output render
    var linkFiledContext = {};
    linkFiledContext.Templates = {};
    linkFiledContext.Templates.Fields = {
    //Apply the new rendering for URL field on List View
    // "URL" is the column name.
    "URL": { "View": URLFiledTemplate }
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(linkFiledContext);
    // This function provides the rendering logic for list view
    function URLFiledTemplate(ctx) {
    var itemTitle=ctx.CurrentItem.Title;
    var urlLink=ctx.CurrentItem.URL;
    var urlDesc=ctx.CurrentItem['URL.desc'];
    if(urlLink!=null&&urlLink!=""){
    if(itemTitle=="Suggestion Box"){
    return "<a href='#' onclick=\"openModalDialog('"+urlLink+"')\">"+urlDesc+"</a>";
    }else{
    return "<a href='"+urlLink+"' target='_blank'>"+urlDesc+"</a>";
    }else{
    return "";
    function openModalDialog(url)
    var options = {
    title: "Suggestion Box",
    autoSize: true,
    url: url
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
    2.Edit the list view page.
    3.Edit the list web part. Go to Miscellaneous -> JS Link.
    4.Add the following URL into the JS Link textbox.
     ~site/SiteAssets/URLPopup.js
    5.Click "OK" and save the page.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Problems with some web parts when using XSLT

    I have a page on which I have several web parts. Some web parts are custom while others are OOB and only XSLT is applied on them.  
    I am using 2 WFEs with NLB. Problem is when I do iisreset on one of the WFE then the OOB web parts with XSLT start giving error. You know the standard error "corelation ID....bla bla bla". Anyway the error automatically goes away after a 2, 3 minutes.
    So basically if I do iisreset or stop the iis, and then load that page, then all custom web parts load fine except those OOB web parts with XSLT. And then they too start working fine after 2, 3 minutes if I reload page.  
    What could be the reason for that? Looks like some service on which XSLT depends take time to load!? And once that service is loaded then they start working fine?  Or it could be due to distributed cache or something!?

    Hi  Frank,
    Which version of the SharePoint 2010 did you use?
    In June 2011 CU code was added to the DataFormWebPart (which is used to display list data) that if an XSLT transform took longer than 5 seconds, a StackOverflowException was thrown. This was done to avoid
    a potential Denial Of Service attack on SharePoint if crafted XML could be sent that would continually clog up the XSLT, thereby stopping pages from rendering.
    In August 2011 CU the transform "timeout" was reduced from 5 seconds to 1.
    So, any list with XSLT that takes longer than 1 second to parse in an XSLT transform goes *boom*.
    After you perform an IIS reset , the cache of the page was cleared and you encountered the error. Once the page is cached, there is no error.
    You can try to set up XSLT Timeout with the following PS commands:
    $farm = Get-SPFarm
    $farm.XsltTransformTimeOut = 5
    $farm.Update()
    Reference:
    http://social.msdn.microsoft.com/Forums/sharepoint/de-DE/44cfd798-be7a-4436-8786-bd44049e7def/sp2010-column-filter-causing-unable-to-display-web-part-error-and-a-stack-overflow-exception?forum=sharepointgeneralprevious
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • XSLT Caching

    HI,
    I am using JAXP Template object to cache my XSLT files. Can my code pass parameters to a cached XSLT file?
    Thanks,
    Java-Junkie

    I am using the following code to handle my transforms, can you suggest how I would cache the xslt files?
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import java.util.*;
    import java.io.*;
    public class TransformerPool
    /** Source control version number. */
    public final static String SOURCE_VERSION_INFO = "%R%";
    /** Minimum number of transformers per transformation. */
    public final static int MIN_INSTANCES = 1;
    /** Maximum number of transformers per transformation. */
    public final static int MAX_INSTANCES = 5;
    // class members
    private static TransformerFactory tFactory;
    private static TransformerPool thisTP;
    // data members
    private Map transformers;
    private int defaultMinInstances;
    private int defaultMaxInstances;
    private class PoolEntry
    private int minInstances;
    private int maxInstances;
    private int currentInstances;
    private int hits;
    private int waitStates;
    private int waitIter;
    private StreamSource xslDocument;
    private boolean busy[];
    private Transformer processors[];
    public PoolEntry(TransformerPool source, String xslDocument)
    init(source);
    initTransformer(xslDocument);
    public PoolEntry(TransformerPool source, StreamSource streamSource)
    init(source);
    initTransformer(streamSource);
    public void init(TransformerPool source)
    minInstances = source.defaultMinInstances;
    maxInstances = source.defaultMaxInstances;
    currentInstances = minInstances;
    hits = 0;
    waitStates = 0;
    waitIter = 0;
    public void initTransformer(String xslDocument)
    initTransformer(new StreamSource(new StringReader(xslDocument)));
    public void initTransformer(StreamSource xslDocument)
    this.xslDocument = xslDocument;
    busy = new boolean[maxInstances];
    processors = new Transformer[maxInstances];
    for ( int i=0; i<maxInstances; i++ )
    busy[i] = false;
    processors[i] = i < currentInstances ? newTransformer() : null;
    private Transformer newTransformer()
    synchronized (TransformerPool.tFactory)
    try
    Templates cashedXSLT = TransformerPool.tFactory.newTemplates(xslDocument);
    Transformer trans = cashedXSLT.newTransformer();
    return trans;
    //return TransformerPool.tFactory.newTransformer(xslDocument);
    catch (TransformerConfigurationException e)
    return null;
    public boolean transform(Source xml, Result result, Properties params)
    boolean isBusy = false;
    boolean allNull = false;
    Transformer xform = null;
    int index = -1;
    do
    if (isBusy)
    try
    Thread.currentThread().sleep(100);
    catch (InterruptedException e)
    synchronized (this)
    allNull = true;
    for ( int i=0; i<maxInstances; i++ )
    if (processors[i] != null)
    allNull = false;
    if (processors[i] != null && busy[i] == false)
    index = i;
    xform = processors;
    busy[i] = true;
    isBusy = false;
    break;
    if (allNull == true) // theres nothing we can do; fail
    return false;
    if (index == -1)
    waitIter++;
    isBusy = true;
    } while (isBusy);
    // we should have a transformer now
    try
    String paramName;
    xform.clearParameters();
    if(params!=null){
    for ( Enumeration e=params.propertyNames(); e.hasMoreElements(); )
    paramName = (String)e.nextElement();
    xform.setParameter(paramName, params.get(paramName));
    Message.out(Message.DEBUG, "starting transform");
    xform.transform(xml, result);
    Message.out(Message.DEBUG, "ending transform");
    catch (Exception e)
    e.printStackTrace();
    Message.out(Message.DEBUG, "exception? " + e.toString());
    return false;
    finally
    if (xform != null)
    synchronized (this)
    busy[index] = false;
    // increment counters
    if (isBusy)
    waitStates++;
    hits++;
    return true;
    * Create a new {@link TransformerPool}.
    private TransformerPool()
    if (tFactory == null)
    tFactory = TransformerFactory.newInstance();
    transformers = new HashMap();
    defaultMinInstances = MIN_INSTANCES;
    defaultMaxInstances = MAX_INSTANCES;
    * Create a new {@link TransformerPool}.
    * @return A {@link TransformerPool} instance.
    public static synchronized TransformerPool getInstance()
    if (thisTP == null)
    thisTP = new TransformerPool();
    return thisTP;
    private synchronized PoolEntry newEntry(StreamSource xsl)
    return xsl == null ? null : new PoolEntry(this, xsl);
    public synchronized void dump(PrintWriter out)
    PoolEntry entry;
    String key;
    out.println("Default instances: " + defaultMinInstances +
    " (minimum), " + defaultMaxInstances + " (maximum)");
    out.println("Transfomers: " + transformers.size());
    out.println();
    for ( Iterator iter=transformers.keySet().iterator(); iter.hasNext(); )
    key = (String)iter.next();
    entry = (PoolEntry)transformers.get(key);
    out.println("Transformer: " + key);
    out.println(" Instances: " + entry.minInstances + " (minimum), " +
    entry.maxInstances + " (maximum), " + entry.currentInstances +
    " (current)");
    out.println(" Hits: " + entry.hits + " (" + entry.waitStates + " busy)");
    for ( int i=0; i<entry.maxInstances; i++ )
    out.println(" (" + i + ") " + entry.processors[i] + " " + (entry.busy[i] ? "busy" : "not busy"));
    out.println();
    out.flush();
    * Add a new transformation.
    * @param name Transformation name as a String.
    * @param xsl Transformation XSLT document as a StreamSource.
    public synchronized void addTransformation(String name, StreamSource xsl)
    PoolEntry entry = newEntry(xsl);
    if (entry != null)
    transformers.put(name, entry);
    * Remove a given transformation.
    * @param name Transformation name as a String.
    public synchronized void removeTransformation(String name)
    transformers.remove(name);
    * Determines if a given transformation exists.
    * @param name Transformation name as a String.
    * @return <code>true</code> if there is a transformation by that
    * name, otherwise <code>false</code>.
    public synchronized boolean isTransformation(String name)
    return transformers.containsKey(name);
    * Transform an XML document using a named transformation.
    * @param name Transformation name as a String.
    * @param xml XML document to transform as a Source.
    * @param result Transformed document as a Result.
    * @return <code>true</code> if the transformation succeeded or
    * <code>false</code> if the transformation couldn't be completed
    * for any reason.
    public synchronized boolean transform(String name, Source xml, Result result)
    // find the entry
    PoolEntry entry = (PoolEntry)transformers.get(name);
    if (entry == null)
    return false;
    // transform
    return entry.transform(xml, result, null);
    * Transform an XML document using a named transformation.
    * @param name Transformation name as a String.
    * @param xml XML document to transform as a Source.
    * @param result Transformed document as a Result.
    * @param params Collection of transformation parameters as Properties.
    * @return <code>true</code> if the transformation succeeded or
    * <code>false</code> if the transformation couldn't be completed
    * for any reason.
    public synchronized boolean transform(String name, Source xml, Result result, Properties params)
    // find the entry
    PoolEntry entry = (PoolEntry)transformers.get(name);
    if (entry == null)
    return false;
    // transform
    return entry.transform(xml, result, params);

  • CDATA appearing but not rendering as html...

    simple XML
    <products>
        <product>
               <process>Preservation</process>
              <application>Crack Filling</application>
              <rank>100</rank>
              <productType>Viscosity Grade Asphalts</productType>
              <productName>AC-20 Asphalt Cement</productName>
              <suppliers><![CDATA[<a href="#">Indianapolis IN</a>,Des Moines IA,Laketon IN]]></suppliers>
              <pdf>AMI%202007%20AC-30,AC-20,AC-15,AC-10,AC-5,AC-25,AP-3,AP-5,OAF-1.pdf</pdf>
       </product>
    </products>
    in dataset
    var ds1 = new Spry.Data.XMLDataSet("datasets/master.xml", "products/product", {sortOnLoad: "process", sortOrderOnLoad: "ascending"});
    ds1.setColumnType("suppliers", "html");
    coming out in a repeat table
    <tr spry:repeat="ds1" spry:odd="blue">
            <td>{process}</td>
            <td><a href="{pdf}">{productName}</a></td>
            <td>{application}</td>
            <td>{suppliers}</td>
    </tr>
    ISSUE
    The {suppliers} info appears but none of it is rendered out as HTML. Isn't the columnType="html" suppose to eliminate this issue? From reading the board it seems that  people are talking about varying issues with different versions of SPRY. Any insight on what I should be doing different here? I have // xpath.js - version 0.7 - Spry Pre-Release 1.6.1

    found, the issue - there was a section further down the XSLT file that needed the disable-output-escaping adding to (below is the original section) - once updated it worked like a charm - thanks
    <xsl:template name="_LFtoBRloop">
        <xsl:param name="input" />
        <xsl:variable name="beforeText" select="substring-before($input, '&#xA;')" />
        <xsl:choose>
          <xsl:when test="string-length($beforeText) = 0 and substring($input, 1, 1) != '&#xA;'">
            <xsl:value-of select="$input" />
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="$beforeText" />
            <br />
            <xsl:call-template name="_LFtoBRloop">
              <xsl:with-param name="input" select="substring($input, string-length($beforeText)+2)" />
            </xsl:call-template>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>

Maybe you are looking for

  • Wine - probably nt.dll error.

    Hi. I try to run a game, which used to work just fine on my previous hardware. It has platinum rank on appdb. When I execute it, menu comes up and then game freezes with error: fixme:win:EnumDisplayDevicesW ((null),0,0x32f3f0,0x00000000), stub! fixme

  • Information in Histogram in Adobe Camera RAW

    Since I capture my images in RAW, when I open them in Adobe Camera RAW (via Elements 11), what information is displayed in the image and the histogram I see? Is it showing me the jpeg created in the camera?  If so, the jpeg settings in my camera are

  • How to make a logo look distressed

    Attached is a vector logo a client supplied to me. I'm trying to achieve the same distressed look for a logo that I will be having a stamp made from. What is the best way to go about this.

  • Qosmio X500: Lan/Internet connection get lost after period of time

    Hi all,. I got the qosmio x500 for about half a year now... I got this problem where after about 5 hours or less the lan/internet connection get lost. I disabled the wireless connection and is using only the wired connnection now. When it get disconn

  • Going back to Flash builder 4 on Mac because of the design view

    I've got installed the Flash builder 4.6 in a Mountain Lion Mac. I have imported a project that I did some years ago with Flex 3. Everything seems to be ok until I try to see the design view. I can't see anything, it is just empty. I know that it is