Xsl:template in insert-request

Hi all
I try to use <xsl:call-template >
in the transform page that is being call from <xsql:insert-request> but I get an error
<xsql-error action="xsql:insert-request"><message>XSL-1049: Template '' invoked but not defined.</message></xsql-error>
i need to call template because I need to run on a string and tokenize it, so I have use to template with recursion
does anyone has a clue
null

hi Jinyu
the xsl is
<?xml version="1.0" encoding="ISO-8859-1"?>
<ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
<xsl:choose>
<xsl:when test="string-length(STORIES/STORY/TICKER) >0">
<xsl:message> before call</xsl:message>
<xsl:call-template select="tokinze"/>
<xsl:message> AFTER call</xsl:message>
</xsl:when>
</xsl:choose>
<xsl:template name="tokinze">
<xsl:message> In Tokinze</xsl:message>
<ROW>
<REPOSITORY_ID><xsl:value-of select="concat('reuters','$thedate',../@repository_id)"/></REPOSITORY_ID>
<SEQ><xsl:value-of select="position()"/></SEQ>
<RSM_ATTRIBUTE>ticker</RSM_ATTRIBUTE>
<RSM_VALUE1><xsl:value-of select="../TICKER"/></RSM_VALUE1>
<RSM_PUBLISH>0</RSM_PUBLISH>
</ROW>
</xsl:template>
</ROWSET>
and what i need to do is to token the string
that i get in the TICKER field thats' why i need to use
recursion
thanks

Similar Messages

  • Access to Session variables in XSL via insert-request

    We using the Transform="MyInsert.XSL" on the Insert-Request. How do we reference Session variables in the XSL?
    Thanks

    [list=1]
    [*]Add a top-level <xsl:param> to your stylesheet to define a top-level stylesheet parameter, for example <xsl:param name="foo"/>
    [*]Use <xsql:set-stylesheet-param name="foo" value="{@session-var-name}"/> in your XSQL page before your <xsql:insert-request> to set the value of the top-level stylesheet parameter named "foo" to the value of the session parameter you want.
    [list]

  • Order of parameters to xsql:insert-request

    I am trying to create a general purpose xsl style sheet to generate a data input form using data from the COLS table. I can generate the form but the order of the parameters returned by the form does not match the column order of the table which xsql:insert-request seems to require. Is there any way of ordering the parameter values to match the column order of the table?
    Also, xsql:insert-request inserted records with null values without returning an error message when the column values were not in the correct order.
    Thanks,
    Kumar

    Can't you use the XSL Transformation that's being used by the xsql:insert-request tag to order the columns correctly?
    The order of the parameters coming in is dependent on the browser and on the servlet. It is likely the same order that they appear in your HTML form, but I don't believe there's a guarantee on the order.
    The next release of the XML SQL Utility (which does the SQL-to-XML and XML-Insert work under the covers for the XSQL Servlet) supports order-insensitive inserting.

  • XSL-1047: (Error) Invalid instantiation of 'xsl:output' in 'INSERT' context

    Following is my development environment:
    JDeveloper 9i Release Candidate
    JDeveloper JVM 1.3.1
    Oracle XML Parser v2 9.2.0.0.0
    I'm using the Oracle XML Parser V2 9.2.0.0.0 library to apply a stylesheet to an XML document. However when I invoke the call to processor.processXSL() an XSLException is thrown with the following details:
    oracle.xml.parser.v2.XSLException: <Line 1, Column 116>: XSL-1047: (Error) Invalid instantiation of 'xsl:output' in 'INSERT' context.
    exception
    Below is the sequence of events:
    // Create an instance of XSLProcessor to perform the transformation
    XSLProcessor processor = new XSLProcessor();
    // create a Reader from a String object that contains the stylesheet text
    StringReader r = new StringReader( stylesheet );
    // create a new XSL stylesheet, passing it the Reader object reference
    XSLStylesheet sheet = processor.newXSLStylesheet(r);
    // apply the stylesheet
    // the variable sheet represents the XSLStylesheet object
    // the variable source represents the XMLDocument object
    // this call throws the exception
    DocumentFragment df =
    processor.processXSL(sheet,source);
    I've included the Stylesheet and source XML file I'm processing below.
    Note: My application works fine when I use the Oracle XML Parser v2 9.0.1 library. (although I have to use new XSLStylesheet() in place of XSLProcessor.newXSLStylesheet())
    Any ideas on what has changed between the two releases? I do have a reproducible test case that I can send on if required?
    thanks in advance
    private String stylesheet =
    "<INSERT xsl:version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> "+
    "<xsl:output method=\"xml\" indent=\"yes\"/> "+
    "<ROWSET table_name=\"acc_database\"> "+
    " <xsl:for-each select=\"DATABASES/DATABASE\"> "+
    " <ROW> "+
    " <DBID><xsl:value-of select=\"DBID\"/></DBID> "+
    " <DBNAME><xsl:value-of select=\"DBNAME\"/></DBNAME> "+
    " <DBSIZE><xsl:value-of select=\"DBSIZE\"/></DBSIZE> "+
    " <DBPATHNAME><xsl:value-of select=\"DBPATHNAME\"/></DBPATHNAME> "+
    " <DBUSER><xsl:value-of select=\"DBUSER\"/></DBUSER> "+
    " <DBPASSWORD><xsl:value-of select=\"DBPASSWORD\"/></DBPASSWORD> "+
    " <ISAPPDB><xsl:value-of select=\"ISAPPDB\"/></ISAPPDB> "+
    " <ISATTACHEDDB><xsl:value-of select=\"ISATTACHEDDB\"/></ISATTACHEDDB> "+
    " <CONVERTDB><xsl:value-of select=\"CONVERTDB\"/></CONVERTDB> "+
    " <VERSION><xsl:value-of select=\"VERSION\"/></VERSION> "+
    " </ROW> "+
    " </xsl:for-each> "+
    "</ROWSET> "+
    "</INSERT>";
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- this file was generated by the Oracle Migration Workbench Exporter for MS Access 9.2.0.1.0 on 13/02/02 15:16:52 -->
    <!-- Do not modify this file as any modification will invalidate the export and subsequent migration of your MS Access database -->
    <DATABASES>
    <DATABASE>
    <DBID>1</DBID>
    <DBNAME>xmltest</DBNAME>
    <DBSIZE>1</DBSIZE>
    <DBPATHNAME>E:\xmltest.mdb</DBPATHNAME>
    <DBUSER>xmltest</DBUSER>
    <DBPASSWORD>oracle</DBPASSWORD>
    <ISAPPDB>1</ISAPPDB>
    <ISATTACHEDDB>0</ISATTACHEDDB>
    <CONVERTDB>1</CONVERTDB>
    <VERSION>4.0</VERSION>
    <TABLES>
    <TABLE PRIMARY_KEY="1">
    <TBLID>1</TBLID>
    <DBID>1</DBID>
    <TBLNAME>xsu_test</TBLNAME>
    <CNVTABLESTRUCT>1</CNVTABLESTRUCT>
    <CNVMOVEDATA>1</CNVMOVEDATA>
    <CNVRI>1</CNVRI>
    <CNVVALIDATION>1</CNVVALIDATION>
    <CNVDEFAULT>1</CNVDEFAULT>
    <CNVADDTIMESTAMP>1</CNVADDTIMESTAMP>
    <ATTACHTABLEBACKTOACCESS>1</ATTACHTABLEBACKTOACCESS>
    <SAVEPASSWORD>0</SAVEPASSWORD>
    <CNVMAKEUPDATEABLE>1</CNVMAKEUPDATEABLE>
    <RETAINLOCALCOPY>0</RETAINLOCALCOPY>
    <SYNCWITHSERVER>1</SYNCWITHSERVER>
    <OWNERID>1</OWNERID>
    <VALIDATIONTEXT></VALIDATIONTEXT>
    <VALIDATIONRULE></VALIDATIONRULE>
    <NUMBEROFROWS>1</NUMBEROFROWS>
    <CACHINGTABLE>0</CACHINGTABLE>
    <DESCRIPTION></DESCRIPTION>
    <COLUMNS>
    <COLUMN>
    <COLID>1</COLID>
    <TBLID>1</TBLID>
    <COLNAME>id</COLNAME>
    <COLTYPE>4</COLTYPE>
    <COLTYPEDESC>Long</COLTYPEDESC>
    <COLAUTOINCR>1</COLAUTOINCR>
    <NEXTCOUNTERVALUE>0</NEXTCOUNTERVALUE>
    <MAXLENGTHSOURCE>0</MAXLENGTHSOURCE>
    <AVGLENGTHSOURCE>0</AVGLENGTHSOURCE>
    <COLTEXTSIZE>4</COLTEXTSIZE>
    <ALLOWZEROLENGTH>0</ALLOWZEROLENGTH>
    <DEFAULTVALUE></DEFAULTVALUE>
    <COLREQUIRED>1</COLREQUIRED>
    <COLCOLLATINGORDER>1033</COLCOLLATINGORDER>
    <COLORDPOSITION>1</COLORDPOSITION>
    <VALIDATIONRULE></VALIDATIONRULE>
    <VALIDATIONTEXT></VALIDATIONTEXT>
    <COLUMNDESCRIPTION></COLUMNDESCRIPTION>
    </COLUMN>
    <COLUMN>
    <COLID>2</COLID>
    <TBLID>1</TBLID>
    <COLNAME>name</COLNAME>
    <COLTYPE>10</COLTYPE>
    <COLTYPEDESC>Text</COLTYPEDESC>
    <COLAUTOINCR>0</COLAUTOINCR>
    <NEXTCOUNTERVALUE>0</NEXTCOUNTERVALUE>
    <MAXLENGTHSOURCE>0</MAXLENGTHSOURCE>
    <AVGLENGTHSOURCE>0</AVGLENGTHSOURCE>
    <COLTEXTSIZE>50</COLTEXTSIZE>
    <ALLOWZEROLENGTH>0</ALLOWZEROLENGTH>
    <DEFAULTVALUE></DEFAULTVALUE>
    <COLREQUIRED>1</COLREQUIRED>
    <COLCOLLATINGORDER>1033</COLCOLLATINGORDER>
    <COLORDPOSITION>2</COLORDPOSITION>
    <VALIDATIONRULE></VALIDATIONRULE>
    <VALIDATIONTEXT></VALIDATIONTEXT>
    <COLUMNDESCRIPTION></COLUMNDESCRIPTION>
    </COLUMN>
    </COLUMNS>
    <INDEXES>
    <INDEX>
    <INDID>1</INDID>
    <TBLID>1</TBLID>
    <DBID>1</DBID>
    <INDNAME>id</INDNAME>
    <CNVINDEX>1</CNVINDEX>
    <ISPRIMARY>0</ISPRIMARY>
    <ISUNIQUE>0</ISUNIQUE>
    <ISFOREIGN>0</ISFOREIGN>
    <IGNORENULLS>0</IGNORENULLS>
    <ISREQUIRED>0</ISREQUIRED>
    <INDEX_COLUMNS>
    <INDEX_COLUMN>
    <INDCOLID>1</INDCOLID>
    <INDID>1</INDID>
    <COLID>1</COLID>
    <COLORDER>1</COLORDER>
    </INDEX_COLUMN>
    </INDEX_COLUMNS>
    </INDEX>
    <INDEX>
    <INDID>2</INDID>
    <TBLID>1</TBLID>
    <DBID>1</DBID>
    <INDNAME>PK_xsu_test</INDNAME>
    <CNVINDEX>1</CNVINDEX>
    <ISPRIMARY>1</ISPRIMARY>
    <ISUNIQUE>1</ISUNIQUE>
    <ISFOREIGN>0</ISFOREIGN>
    <IGNORENULLS>0</IGNORENULLS>
    <ISREQUIRED>1</ISREQUIRED>
    <INDEX_COLUMNS>
    <INDEX_COLUMN>
    <INDCOLID>2</INDCOLID>
    <INDID>2</INDID>
    <COLID>1</COLID>
    <COLORDER>1</COLORDER>
    </INDEX_COLUMN>
    </INDEX_COLUMNS>
    </INDEX>
    </INDEXES>
    </TABLE>
    </TABLES>
    <RELATIONS>
    </RELATIONS>
    </DATABASE>
    <ATTACHED_TABLES>
    </ATTACHED_TABLES>
    </DATABASES>

    Your problem is that your stylesheet is illegal.
    You're using the "simple form" of the stylesheet which
    is equivalent to having a single root template.
    If you use the simple form, you cannot use: <xsl:include>,
    <xsl:import>, <xsl:output>, <xsl:param>
    or any other <xsl:XXX> element which must be at the "top-level"
    of the stylesheet.
    The solution is to change from:
    <INPUT xsl:version="1.0" xmlns:xsl="...">
       <xsl:output>
    </INPUT>.
    which is illegal to:
      <xsl:stylesheet version="1.0" xmlns:xsl="...">
        <xsl:output>
        <xsl:template match="/">
          <INPUT>
          </INPUT>
        </xsl:template>
      </xsl:stylesheet>

  • Using xsgl:insert-request to insert non-English character data from HTML form

    I tried to insert a text written in French and pasted into an HTML form into my database following the recipe from the XSQL release notes.
    The table:
    create table content_object (
    id number(9) constraint pk_content_object primary key,
    author number(9),
    title varchar2(256),
    abstract varchar2(1024),
    object_type_id number(9),
    content_meat clob,
    XML file the form is posted to:
    <?xml version="1.0"?>
    <xsql:insert-request connection="demo"
    xmlns:xsql="urn:oracle-xsql"
    table="content_object"
    transform="article_form_to_content_object.xsl"/>
    article_form_to_content_object.xsl:
    <?xml version = '1.0'?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="request/parameters">
    <ROW>
    <TITLE><xsl:value-of select="title_field"/></TITLE>
    <ABSTRACT><xsl:value-of select="abstract_field"/></ABSTRACT>
    <CONTENT_MEAT><xsl:value-of select="content_field"/></CONTENT_MEAT>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    The result was:
    <ROW num="2">
    <ID>6</ID>
    <TITLE>Le go</TITLE>
    <ABSTRACT>Vin bouchonn</ABSTRACT>
    <CONTENT_MEAT>Des conditions de conservation au tant d</CONTENT_MEAT>
    </ROW>
    All strings were cropped at the point where the first accented character appeared.
    Any idea why this is happening? With English texts it works just fine.
    Maciej

    Another user hit this problem this week. I debugged it and posted the reply in the discussion thread:
    http://technet.oracle.com:89/ubb/Forum11/HTML/002799.html
    It's a JDK bug in character set conversion that has a simple workaround, just indicate the ISO-8859-1 encoding on your XSQL page. See the end of this other thread for details.

  • Insert-request & sequence values

    Trying to employ a seq value (not null, key field) along with insert-request causes ORA-01400. Current transform produces:
    <field1>sequencename.NEXTVAL</field1>
    <field2>fieldvalue1</field2>
    <fieldn>fieldvaluen</fieldn>
    Since I don't know how many rows will be inserted, I can't really select sequencename.NEXTVAL from dual.
    Any suggestions?
    JV

    ok, we figured it out. make certain your before-insert trigger is properly established, and make no reference whatsoever to that column in your transform.xsl that is used in conjunction with the insert-request.
    As the insert-request performs the insert (presumably the same for update-request), the trigger will obtain the next seqval, and the transform, if properly formed in canonical format, will pass the xml tree to the insert-request and the fields will be inserted "clean as a whistle".!

  • Anyone can help?Trying to know the name of a Contract Terms xsl template

    I am trying to change some of the data fields in a Contract. It is not in the Contract Terms part, but in the first page, when I view the Contract via 'Purchase Order' Form > Terms > View Contract Terms and then select Preview Contract. There appears to be three parts, the first page that has the Contractors name, address, tele and email, then the PO on the next page then the Contract Terms on the following pages. It is the address data on the first page (which is taken from the 'Bill-To' on the PO) that I am trying to get from another data source (the DFF on the PO).
    1) What is the name of the xsl template for this first page?
    2) In order to customise this first page, to bring further data into the XML, how is this possible? I understand that the XML is created 'on the fly' and its not possible to obtain this, but is there any way of customising the fields that are put into this XML?
    prasanna
    Edited by: prasamb on Jul 27, 2009 7:58 AM

    xsl template is PO_STANDARD_XSLFO.xsl
    u must know how to code in xsl also
    u can not modify seeded xsl ,so you need to create new xsl-fo template
    Thanks
    Rahul

  • EhP 5 New function, sharing template of Purchase Request or Purchase Order

    Hi Experts,
    From SAP ERP MM EhP 5, we can create, save and load " template " of Purchase Request or Purchase Order.
    This is discribed on SAP release note of EhP 5 "LOG_MM_CI_3: Public Templates in Purchase Orders and Requisitions".
    Does someone know whether this public document template is shared cross company codes, cross clients?
    Best regards,
    Tadasuke

    Hi Tadasuke,
    Maybe here you can get some info
    https://websmp107.sap-ag.de/erp-ehp
    Regards

  • Activity Templates inside Service Request Templates

    I have run into a problem and I was hoping there is an easy solution.
    I have built Activity Templates for Access Requests, one template per application.
    Then I have Service Requests for per Job Code, which include up to 20 of those Activity Templates.
    I did it this way specifically so if an Application Access process changed, I could just edit the Activity Template for that Application, and all the Service Requests that use that template would update as well.... or so you would think.
    I just had to change some, and my service request is still showing the old templates, not the esits I did. I waited over an hour. Is this a workflow problem, or a functionality problem? If the Service Request Template saves when created instead of pullign
    the activity templates each time its opened, it defeats my purpose of trying to do this modularly. This also makes absolutely no sense to me either, if that is in effect how it works.
    What that will mean is I will have to edit every service request that uses a specific activity, instead of just that activity template.

    Activity templates do not cascade. When you add an activity template to a Service Request, SCSM creates a copy of the activity template _inside_ the SR template. That's where they diverge.
    Any further changes to the original activity template will not be replicated to any SRs that contain that activity.
    I'm sorry to say that's the way SCSM's template management was implemented.

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

  • xsl:template match="UL/LI|ul/li" has extra space line

    <xsl:template match="UL/LI|ul/li">
    <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
    <fo:block>&#x2022;</fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
    <fo:block>
    <xsl:apply-templates select="*|text()"/>
    </fo:block>
    </fo:list-item-body>
    </fo:list-item>
    </xsl:template>
    how to delete the extra space line at the end of list?

    <xsl:template match="UL/LI|ul/li">
    <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
    <fo:block>&#x2022;</fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
    <fo:block>
    <xsl:apply-templates select="*|text()"/>
    </fo:block>
    </fo:list-item-body>
    </fo:list-item>
    </xsl:template>
    how to delete the extra space line at the end of list?

  • Diff. bet. xsl template and rtf template!

    Hi,
    I need to know the difference between xsl template and rtf template.
    Thank you,
    Regards,
    Vishnu

    Hi,
    My 2 cents:
    You can easily customize a new infoobject created from a template.
    An IO created as a reference to the other IO is not customizable at all. It has no its own properties and master data. It uses the referenced infoobject's properties and master data. It means that you cannot even load master data for this new referenced IO.
    Best regards,
    Eugene

  • Problem applying XSL template for Hash calculation.

    Hi,
    This may not be exactly a Java problem,
    I got a problem removing whitespaces in XML via XSL.
    My XSL:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:ns1="http://www.serverurl.inf/patterns/dss/schemas">
         <xsl:output method = "text" indent="no" encoding="ISO-8859-1"/>
         <xsl:strip-space elements="*"/>
    <xsl:template match="/"><xsl:value-of select="normalize-space(/ns1:messageDSS/ns1:header)"/>
    <xsl:value-of select="normalize-space(/ns1:messageDSS/ns1:body)"/>
    </xsl:template>
    </xsl:stylesheet>This XSL woks fine until I got Strings with duplicate spaces within, like:
    <!-- xml fragment -->
       <ns1:tagA>Aaa Aaa</ns1:tagA>     <ns1:tabB>Bb Bbb</ns1:tagB>
       <!-- will be transformed to:  Aaa AaaBb Bbb -->
       <ns1:tagC>Cc  ccc</ns1:tagC>   <ns1:tagD>Ddd    DD</ns1:tagD>
       <!-- will be transformed to: Cc cccDdd DD -->
       <!-- but should be transformed to: Cc  cccDdd    DD -->
       <!-- the within string repeating spaces are removed, and this is not what I want. -->Thanks for any help.

    I don't think XSLT/XPath 1.0 has any built-in or easily accessible way to trim the strings the way you want. With XSLT/XPath 2.0 you can use replace(foo, '^\s+|\s+$', ''). With XSLT/XPath 1.0 you will need to check whether an extension function supported by your XSLT processor allows a similar regular expression based replacement or you will need to write your own template trimming the spaces.

  • Error in processing XSL template

    Hi I am trying to build an report by using XSL template in BI Publisher 10g integrated with siebel. When i uploaded the template to run the report I am getting the following error
    Caused by: oracle.xdo.parser.v2.XPathException: variable not defined: ' _XDONFSEPERATORS'
    at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1534)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:521)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
    ... 49 more
    Please help me out with this issue
    Thanks

    Do not enter the line number and also do not enter the doc total on the header.  B1 will calculate this based on line totals.
    RecordKey--DocEntry--CardCode-DocDate--DocNum-DocTotal--
    DocType
    1--C000120090610-10--
    dDocument_Service
    For Document_Lines
    RecordKey-----LineNumAccountCode--TaxCode--
    LineTotal
    1--1010101001V4--
    10000

Maybe you are looking for

  • Weirdness with Bullets and Numbers

    I'm using RH8 on Windows XP.  Ever since I upgraded, every time I format a block of text with bullets OR numbers, the software changes my Arial 10 point text to Times New Roman 12.  It's getting annoying having to reformat my text every time I put it

  • UWL Screen customization

    We just upgraded from EP 6. Sp12 to EP 7 SP11.  The UWL changed just a little bit and our stakeholder wants to know if we could change one item back to what it use to be.  Essentially, the 'Refresh' button has been turned into a hyperlink and moved t

  • Forms not coming up.

    Hi, I am getting the error in my java cosole when opening forms: Deleted fndforms.jar-6cbf04c0-66fbd296.zip from JAR cache Deleted fndforms.jar-6cbf04c0-66fbd296.idx from JAR cache Deleted fndformsi18n.jar-2a62ad5e-1dd5750b.zip from JAR cache Deleted

  • Aperture 3.6

    My hard drive dies on my late 2011 macbook pro and Apple provided a new one with Yosemite installed. Aperture 3.6 now runs SOOOO SLOW i cannot stand it. and insight on how to get it to go faster? my box has the standard 8gig RAM which was plenty for

  • Query to check for DB created

    Hi all, How can I query in DB to check for all database created? As well as the size of each DB? Thanks.