XSLT Length

Hi,
Is there a function to know the length of a text inside XSLT files.
<xsl:template name="Lenght" match="Text">
<xsl:element name="Text">
<xsl:value-of select="length(.)" />
</xsl:element>
</xsl:template>
Where can I find this samples or a document with this kind of functions ??
Thanks
jcf

I got this sample on net :
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output method = "text" />
<xsl:template match = "/" >
<xsl:text >
</xsl:text>
<xsl:value-of select = "//BBB[1]" />
<xsl:text > + </xsl:text>
<xsl:value-of select = "//BBB[2]" />
<xsl:text > + </xsl:text>
<xsl:value-of select = "//BBB[3]" />
<xsl:text > = </xsl:text>
<xsl:value-of select = "sum(//BBB)" />
</xsl:template>
</xsl:stylesheet>
using this data :
<AAA >
<BBB>10 </BBB>
<BBB>5 </BBB>
<BBB>7 </BBB>
</AAA>
the output must be :
10 + 5 + 7 = 22
but I'm getting
10
+
5
+
7
=
22
I'm using the Xalan/Xerces Apis, and the transform objetc.
Thanks,
Juliano

Similar Messages

  • XSLT Mapping : XML to Fixed Length File

    Hi,
    I have to code a XSLT mapping which converts the XML into a Fixed Length File Format. I am getting the output but it has some garbage values (Some extra spaces in front of first record and also extra blank lines before the first record)
    I am pasting my xsl sheet :
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="text" indent="yes" media-type="text/plain"/>
         <xsl:template match="Employees">
              <xsl:for-each select="Employee">
                   <xsl:value-of select="Name"/>
                   <xsl:value-of select="ID"/>
                   <xsl:value-of select="ADD"/>
                   <xsl:text>&#xA;</xsl:text>
              </xsl:for-each>
         </xsl:template>
    My input XML file is as follows:
    <?xml version="1.0"?>
    <p1:Test02 xmlns:p1="http://www.infosys.com/xi/training/hyd/66289">
            <Employees>
              <Employee>
                 <Name>Anurag</Name>
                 <ID>1121</ID>
                 <ADD>Hyderabad</ADD>
             </Employee>
             <Employee>
                 <Name>Divya</Name>
                 <ID>1122</ID>
                 <ADD>Hyderabad</ADD>
             </Employee>
             <Employee>
                 <Name>Rasmi</Name>
                 <ID>1123</ID>
                 <ADD>Bangalore</ADD>
                </Employee>
         </Employees>
    </p1:Test02>
    And the output i am receiving is as follows:
        Anurag1121Hyderabad
    Divya1122Hyderabad
    Rasmi1123Bangalore
    Please do help.....

    hi,
    >>>>
    <xsl:output method="text" indent="yes" media-type="text/plain"/>
    you allow the spaces by using indent="yes"
    try with indent="no"
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • DBMS_XMLGEN, Carriage Returns XSLT to HTML

    Hi,
    I am facing an issue using the DBMS_XMLGEN. I have written a function (see under) that receive A SYS_REFCURSOR and return as a CLOB the XML with eventually transformed using a CLOB containing the passed XSLT code.
    The goal is to reuse several time this functions being called by other function/procedure (see under a sample of one of my procedure) of my package. Those procure/function being called by the front-end (Cold fusion) to retrieve and output the results. My purpose is to make independent of the front end solution the output generation. Any language that can call an Oracle Procedure/Function would be able to process the result with or without a XSLT.
    The issue is the CRLF (chr(10)+chr(13) seems to be lost in the process of the varchar2/clob data type used to generate the XML.
    A solution, is to modify the select statement and adding when necessary select ... replace(thefield,chr(10),'<br/>') thefield ... but this would request a post processing which I am trying to avoid.
    FUNCTION GEN_SYSTEM_GENEXML(
        INQUERYSTRING IN SYS_REFCURSOR,
        inStartRow    IN NUMBER,
        inMaxRows     IN NUMBER,
        inXsltString  IN CLOB)
      RETURN CLOB
    AS
      LHTMLOUTPUT XMLTYPE;
      xmlResult CLOB;
      CTX DBMS_XMLGEN.CTXHANDLE;
      lXMLData XMLType;
    BEGIN
      CTX := DBMS_XMLGEN.NEWCONTEXT(INQUERYSTRING);
      dbms_xmlgen.setNullHandling(ctx, 2);
      dbms_xmlgen.setIndentationWidth(ctx, 0);
      dbms_xmlgen.setRowSetTag(ctx, 'ROOT');
      dbms_xmlgen.setRowTag(ctx, 'item');
      dbms_xmlgen.setskiprows(ctx,inStartRow);
      DBMS_XMLGEN.SETMAXROWS(CTX,INMAXROWS);
      IF LENGTH(INXSLTSTRING) <> 0 AND INXSLTSTRING <>'[none]' THEN
        LXMLDATA              := DBMS_XMLGEN.GETXMLTYPE(CTX,DBMS_XMLGEN.NONE);
        LHTMLOUTPUT           :=LXMLDATA.TRANSFORM(XMLTYPE(INXSLTSTRING));
      ELSE
        xmlResult := dbms_xmlgen.getxml(ctx);
      END IF;
      DBMS_XMLGEN.CLOSECONTEXT(CTX);
      IF LENGTH(INXSLTSTRING) <> 0 AND INXSLTSTRING <>'[none]' THEN
        RETURN LHTMLOUTPUT.GETCLOBVAL();
      ELSE
        RETURN XMLRESULT;
      END IF;
    END gen_system_genexml;
    PROCEDURE PRC_GET_CF_CNS(
        inadonis IN NUMBER,
        inyear   IN NUMBER,
        INXSLT   IN CLOB,
        OUTRETURNED OUT CLOB)
    IS
      C1 SYS_REFCURSOR;
    BEGIN
      CASE INYEAR
      WHEN 2008 THEN
        OPEN C1 FOR SELECT ADONIS,
        CRIT_AA_MARKS,
        CRIT_AA_COMMENTS
      END CASE;
      OUTRETURNED :=GEN_SYSTEM_GENEXML(C1,0,10000,INXSLT);
    END PRC_GET_CF_CNS;

    (I mix my accounts, I posted with an outdated email)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionIf I run without XLST I get (DBMSOUTPUT in SQLDevelopper) the CR/LF
    DECLARE
      INADONIS NUMBER;
      INYEAR NUMBER;
      INXSLT CLOB;
      OUTRETURNED CLOB;
    BEGIN
      INADONIS := 100858;
      INYEAR := 2010;
      INXSLT := '[none]';
      PKG_GENERAL.PRC_GET_CF_CNS(
        INADONIS => INADONIS,
        INYEAR => INYEAR,
        INXSLT => INXSLT,
        OUTRETURNED => OUTRETURNED
      DBMS_OUTPUT.PUT_LINE('OUTRETURNED = ' || OUTRETURNED);
    END;if I replace the '[none]' by the xslt string it looks, still in the dbms_output, being there...
    if I
    DBMS_OUTPUT.PUT_LINE('OUTRETURNED = ' || replace(OUTRETURNED,chr(10),'<br/>'));the result is broken...
    For the moment, I do this to avoid post-processing Cold Fusion
    FUNCTION GEN_SYSTEM_GENEXML(
        INQUERYSTRING IN SYS_REFCURSOR,
        inStartRow    IN NUMBER,
        inMaxRows     IN NUMBER,
        inXsltString  IN CLOB)
      RETURN CLOB
    AS
      LHTMLOUTPUT XMLTYPE;
      xmlResult CLOB;
      CTX DBMS_XMLGEN.CTXHANDLE;
      lXMLData XMLType;
    BEGIN
      CTX := DBMS_XMLGEN.NEWCONTEXT(INQUERYSTRING);
      dbms_xmlgen.setNullHandling(ctx, 2);
      dbms_xmlgen.setIndentationWidth(ctx, 0);
      dbms_xmlgen.setRowSetTag(ctx, 'ROOT');
      dbms_xmlgen.setRowTag(ctx, 'item');
      dbms_xmlgen.setskiprows(ctx,inStartRow);
      DBMS_XMLGEN.SETMAXROWS(CTX,INMAXROWS);
      dbms_xmlgen.setConvertSpecialChars(ctx, TRUE);
      IF LENGTH(INXSLTSTRING) <> 0 AND INXSLTSTRING <>'[none]' THEN
        LXMLDATA              := DBMS_XMLGEN.GETXMLTYPE(CTX,DBMS_XMLGEN.NONE);
        LHTMLOUTPUT           :=LXMLDATA.TRANSFORM(XMLTYPE(INXSLTSTRING));
      ELSE
        xmlResult := dbms_xmlgen.getxml(ctx);
      END IF;
      DBMS_XMLGEN.CLOSECONTEXT(CTX);
      IF LENGTH(INXSLTSTRING) <> 0 AND INXSLTSTRING <>'[none]' THEN
        RETURN replace(LHTMLOUTPUT.GETCLOBVAL(),'& l t ; br/ & g t ;','<br/>');
      ELSE
        RETURN XMLRESULT;
      END IF;
    END gen_system_genexml;& l t ; br/ & g t ; without the extract spaces
    Edited by: user4882594 on Jan 20, 2011 7:06 AM
    Edited by: user4882594 on Jan 20, 2011 7:06 AM

  • Swapping XML Parser and XSLT to Xalan 2.7.0 - Not Working (OC4J 10.1.3)

    Hi-
    I'm trying to use the latest Xercies/Xalan classes in OC4J 10.1.3 as described in the How-To swap XML Parsers document:
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
    What I can see happening is that the oracle.xml shared library is successfully 'turned off', but the xalan libraries are not added. Instead, the default xml classes that are distributed with the JDK become visible. For instance, using a slightly modified version of the index.jsp page from the how-to, I get this result:
    ------ Output from JSP page ----------------
    TransformerFactory Instance: org.apache.xalan.processor.TransformerFactoryImpl
    Transformer Instance: org.apache.xalan.transformer.TransformerIdentityImpl
    Transformer Version: Xalan Java 2.4.1 (!!)
    What I expect is for that last line to say version 2.7.0, which is the version of the xalan.jar included in my shared library (code to add that line to the how-to shown below).
    I suspect what is happening is that the class loader is simply not letting a shared library override a system library - to do that you probably need to place the jar files in system endorsed directory.
    Has anyone gotten this how-to to work - actually replacing the XML parser/transform classes with the latest Xalan classes? Are you sure it is seeing the current version you placed in the shared library?
    Thanks,
    Eric Everman
    ---- My modified getXSLTDetails() method in the index.jsp page of the how-to -------
    <!-- Additional Import -->
    <%@ page import="org.apache.xalan.Version" %>
    public static String getXSLTDetails()
    Transformer transformer=null;
    TransformerFactory transformerfactory = TransformerFactory.newInstance();
         Version ver = null;
         String br = "<" + "br" + ">"; //otherwise the otn forum chocks on the break.
    try
    transformer = transformerfactory.newTransformer();
              ver = (Version) transformer.getClass().forName("org.apache.xalan.Version").newInstance();
              String ret_val =
                   "TransformerFactory Instance: "+transformerfactory.getClass().getName() + br +
                   "Transformer Instance: "+transformer.getClass().getName() + br;
              if (ver != null) {
                   ret_val = ret_val + "Transformer Version: " + ver.getVersion() + br;
              } else {
                   ret_val = ret_val + "Transformer Version not Available" + br;
              return ret_val;
    catch (Exception e)
    e.printStackTrace();
    return e.getMessage();
    }--------------------------------------------------------------------

    Steve - Thanks for responding on this.
    The Xalan SQL extension is built into Xalan. The most painless way to try it out is to run it via JEdit: www.jedit.org
    JEdit a OS Java application with a fairly painless install process (I'm assuming you already have a current JRE installed). Once its installed, you'll need to install the XSLT plugin - in JEdit goto Plugins | Plugin Manager | Install and pick the XSLT plugin. You'll need the Oracle JDBC classes on your classpath - this can be done by copying the oracle_jdbc4.jar into the [JEdit install directory]/jars directory.
    Restart to load that jar and you should be all set.
    I included a sample XSLT page at the bottom of this post that is somewhat of a template transform for the SQL extension - its more complicated then it needs to be, but it does some nice things with the results of the query. Save it as a file and make the appropriate changes to the 'datasource' parameter near the top of the file.
    Then in JEdit, open the file and make sure the XSLT plugin is visible (Plugins | XSLT | XSLT Processor Toggle - or alternately dock it in the window via global prefs). In the XSLT plugin: Allow the current buffer to be used as the source, Add that same file as a stylesheet via the '+' button, and pick a result file at the bottom. Then click the 'Transform XML' button.
    Troubleshooting: I seem to remember having some classpath errors when I tried this on windows, but others have had it work w/o issues. I do remeber that the XSLT plugin had a popup window that gave a pretty good explaintion of the problem, if it occurs. Also, for some reason the XSLT plugin will not create a new file for the output, so its often best to create a file first, then choose it as the output. Of course, you can always run a transformation from the command line or w/in an applicatoin. Full docs on the Xalan SQL extension can be found at: http://xml.apache.org/xalan-j/extensionslib.html#sql
    Here is my sample XSLT transform using the SQL extension:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              xmlns:sql="http://xml.apache.org/xalan/sql"
              xmlns:str="http://exslt.org/strings"
              xmlns:xalan="http://xml.apache.org/xalan"
              extension-element-prefixes="sql str xalan">
         <xsl:output indent="yes"/>
         <xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param>
         <xsl:param name="datasource">jdbc:oracle:thin:jqpublic/jqpublic@server_name:1521:dbname</xsl:param>
         <xsl:param name="jndiDatasource"><!-- jndi source for production use w/in enterprise environment --></xsl:param>
         <xsl:param name="debug">true</xsl:param>
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
         <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
         <!--
              The query:  You could pass parameters in to this query to build a where clause, but here is a simple example.
              Also, its nice to wrap the query with a max row number to prevent huge results.
         -->
         <xsl:param name="query">
         select * from (
      SELECT
              'One' FIELD_1,
              'Two' FIELD_2
         FROM DUAL
         ) where rownum < 100
         </xsl:param>
         <!-- Essentially, create a XConnection object -->
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:template match="/">
        <xsl:choose><!-- Connect using JNDI -->
          <xsl:when test="$jndiDatasource != ''">
            <xsl:if test="not(sql:connect($connection, $jndiDatasource))">
              <xsl:message>Failed to connect to db via jndi connection</xsl:message>
              <xsl:comment>Failed to connect to db via jndi connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:when>
          <xsl:otherwise><!-- Connect using connection string -->
            <xsl:if test="not(sql:connect($connection, $driver, $datasource))">
              <xsl:message>Failed to connect to db via driver/url connection</xsl:message>
              <xsl:comment>Failed to connect to db via driver/url connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
              <!--
              The results of the query.  The rowset is brought back in 'streaming' mode,
              so its not possible to ask it for the number of rows, or to check for zero
              rows.  There is a switch to disable streaming mode, but this requires all
              rows to be brought into memory.
              -->
              <xsl:variable name="table" select="sql:query($connection, $query)"/>
              <xsl:if test="not($table)">
                   <xsl:message>Error in Query</xsl:message>
                   <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
              <page>
                   <!-- Your xalan environment -->
                   <xsl:copy-of select="xalan:checkEnvironment()"/>
                   <!-- Build a bunch of metadata about the rows -->
                   <meta>
                        <cols>
                             <xsl:apply-templates select="$table/sql/metadata/column-header"/>
                        </cols>
                   </meta>
                   <rowset>
                        <!--
                             With streaming results, you must use the apply-temmplates contruct,
                             not for-each, since for-each seems to attempt to count the rows, which
                             returns zero.
                        -->
                        <xsl:apply-templates select="$table/sql/row-set"/>
                   </rowset>
              </page>
              <xsl:value-of select="sql:close($connection)"/><!-- Always close -->
         </xsl:template>
         <xsl:template match="row">
              <row>
                   <xsl:apply-templates select="col"/>
              </row>
         </xsl:template>
         <xsl:template match="column-header">
              <col>
                   <xsl:attribute name="type">
                        <xsl:value-of select="@column-typename"/>
                   </xsl:attribute>
                   <xsl:attribute name="display-name">
                        <xsl:call-template name="create-display-name"/>
                   </xsl:attribute>
                   <xsl:value-of select="@column-name"/>
              </col>
         </xsl:template>
         <!-- Convert column names to proper caps: MY_FIELD becomes My Field -->
         <xsl:template name="create-display-name">
              <xsl:variable name="col-name">
                   <xsl:for-each select="str:tokenize(@column-name, '_')">
                        <xsl:value-of
                             select="concat(translate(substring(., 1, 1), $lowercase, $uppercase), translate(substring(.,2), $uppercase, $lowercase), ' ')"/>
                   </xsl:for-each>
              </xsl:variable>
              <xsl:value-of select="substring($col-name, 1, string-length($col-name) - 1)"/>
         </xsl:template>
         <!-- Creates data columns named 'col' with a column-name attribute -->
         <xsl:template match="col">
              <col>
                   <xsl:attribute name="column-name"><xsl:value-of select="@column-name"/></xsl:attribute>
                   <xsl:value-of select="."/>
              </col>
         </xsl:template>
    </xsl:stylesheet>

  • XSLT samples for XML- ABAP mapping

    Hi all,
    Does anyone have a XSLT samples for XML->ABAP mapping ?
    regards

    first create XSLT program by copy pasting the below given code and give the program name as "Y_TEST"
    <b>XSLT code</b>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:output indent="yes"/>
      <xsl:template match="NewDataSet">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="Table">
                <OUTTAB1>
                  <AIRPORTCODE>
                    <xsl:value-of select="AirportCode"/>
                  </AIRPORTCODE>
                  <CITYOFAIRPORTNAME>
                    <xsl:value-of select="CityOrAirportName"/>
                  </CITYOFAIRPORTNAME>
                  <COUNTRY>
                    <xsl:value-of select="Country"/>
                  </COUNTRY>
                  <COUNTRYABBRIVATION>
                    <xsl:value-of select="CountryAbbrviation"/>
                  </COUNTRYABBRIVATION>
                  <COUNTRYCODE>
                    <xsl:value-of select="CountryCode"/>
                  </COUNTRYCODE>
                  <GMTOFFSET>
                    <xsl:value-of select="GMTOffset"/>
                  </GMTOFFSET>
                  <RUNWAYLENGTHFEET>
                    <xsl:value-of select="RunwayLengthFeet"/>
                  </RUNWAYLENGTHFEET>
                  <RUNWAYELEVATIONFEET>
                    <xsl:value-of select="RunwayElevationFeet"/>
                  </RUNWAYELEVATIONFEET>
                  <LATITUDEDEGREE>
                    <xsl:value-of select="LatitudeDegree"/>
                  </LATITUDEDEGREE>
                  <LATITUDEMINUTE>
                    <xsl:value-of select="LatitudeMinute"/>
                  </LATITUDEMINUTE>
                  <LATITUDESECOND>
                    <xsl:value-of select="LatitudeSecond"/>
                  </LATITUDESECOND>
                  <LATITUDENPEERS>
                    <xsl:value-of select="LatitudeNpeerS"/>
                  </LATITUDENPEERS>
                  <LONGITUDEDEGREE>
                    <xsl:value-of select="LongitudeDegree"/>
                  </LONGITUDEDEGREE>
                  <LONGITUDEMINUTE>
                    <xsl:value-of select="LongitudeMinute"/>
                  </LONGITUDEMINUTE>
                  <LONGITUDESECONDS>
                    <xsl:value-of select="LongitudeSeconds"/>
                  </LONGITUDESECONDS>
                  <LONGITUDEEPERW>
                    <xsl:value-of select="LongitudeEperW"/>
                  </LONGITUDEEPERW>
                </OUTTAB1>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:stylesheet>
    <b>just create a type 1 program and paste the below given code.</b>
    report y_consume_webservice .
    data: wf_user type string .
    data: wf_password type string .
    types: begin of outtab1 ,
       airportcode(6)  ,
       cityofairportname(50),
       country(30)  ,
       countryabbrivation(10),
       countrycode(6)  ,
       gmtoffset(10)  ,
       runwaylengthfeet(15),
       runwayelevationfeet(15),
       latitudedegree(10)  ,
       latitudeminute(10)  ,
       latitudesecond(10)  ,
       latitudenpeers(10)  ,
       longitudedegree(10)  ,
       longitudeminute(10)  ,
       longitudeseconds(10)  ,
       longitudeeperw(10) ,
       end of outtab1 .
    data: outtab type  table of outtab1.
    data: wf_o like line of outtab .
    data: g_okcode like sy-ucomm .
    data: my_container   type ref to cl_gui_custom_container .
    data: g_dock type ref to cl_gui_docking_container .
    data: mygrid type ref to cl_gui_alv_grid .
    data: wf_field_cat type lvc_t_fcat .
    data: wf_field_cat_wa like line of wf_field_cat ,
          wf_is_layout type lvc_s_layo .
    data: wf_fld_cat type slis_t_fieldcat_alv .
    data: wf_fld_cat_wa like line of wf_fld_cat .
    data: wf_repid like sy-repid .
    data: int_tab_name type slis_tabname .
    data: xslt_err type ref to cx_xslt_exception .
    constants:
    * encoding for download of XML files
    encoding     type string value 'utf-8' .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: uri2(132) type c lower case .
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default 'proxy.xxx.com' ,
                p_port(4) default '80'.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
    clear wf_string .
    concatenate
    '<?xml version="1.0" encoding="utf-8"?>'
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
    '<soap:Body>'
    '<GetAirportInformationByCountry xmlns="http://www.webserviceX.NET">'
    '<country>' uri2 '</country>'
    '</GetAirportInformationByCountry>'
    '</soap:Body>'
    '</soap:Envelope>'
    into wf_string .
    clear :rlength , txlen .
    rlength = strlen( wf_string ) .
    move: rlength to txlen .
    clear: wf_proxy, wf_port .
    move: p_proxy to wf_proxy ,
          p_port to wf_port .
    call method cl_http_client=>create
      exporting
        host          = 'www.webservicex.net'
        service       = '80'
        scheme        = '1'
        proxy_host    =  wf_proxy
        proxy_service =  wf_port
      importing
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = user .
    wf_password = password .
    call method http_client->authenticate
      exporting
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_method'
        value = 'POST'.
    call method http_client->request->set_header_field
      exporting
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_uri'
        value = '/airport.asmx'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Type'
        value = 'text/xml; charset=utf-8'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Length'
        value = txlen.
    call method http_client->request->set_header_field
      exporting
        name  = 'SOAPAction'
        value = 'http://www.webserviceX.NET/GetAirportInformationByCountry'.
    call method http_client->request->set_cdata
      exporting
        data   = wf_string
        offset = 0
        length = rlength.
    call method http_client->send
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2.
    call method http_client->receive
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3.
    clear wf_string1 .
    wf_string1 = http_client->response->get_cdata( ).
    replace all occurrences of
        '<' in wf_string1 with '<' .
    replace all occurrences of
    '>' in wf_string1 with '>' .
    replace all occurrences of
    'xmlns=' in wf_string1 with 'xmlns:xsl=' .
    try .
        call transformation (`Y_TEST`)
                source xml wf_string1
                result     outtab = outtab.
      catch cx_xslt_exception into xslt_err.
        data: s type string.
        s = xslt_err->get_text( ).
        write: ': ', s.
        stop.
    endtry .
    break-point .
    Try this and give me your feedback.
    Regards
    Raja

  • XSLT Req

    Hi Folks,
    Can anyone there help me out as to whether the following req can be done using XSLT, and if so how?
    Here is what I need.
    <Ship>
    <SInfo>
      <SegmentIdentifier>ABC</SegmentIdentifier>
      <ShipTo>0004100357</ShipTo>
      <PCount>2</PCount>
      <SWeight>30</SWeight>
      <UOM>KG</UOM>
    </SInfo>
    <SInfo>
      <SegmentIdentifier>ABC</SegmentIdentifier>
      <ShipTo>0004100357</ShipTo>
      <PCount>3</PCount>
      <SWeight>25</SWeight>
      <UOM>KG</UOM>
    </SInfo>
    <SInfo>
      <SegmentIdentifier>ABC</SegmentIdentifier>
      <ShipTo>0004100357</ShipTo>
      <PCount>2</PCount>
      <SWeight>20</Sweight>
      <UOM>KG</UOM>
    </SInfo>
    <SInfo>
      <SegmentIdentifier>ABC</SegmentIdentifier>
      <ShipTo>0004100300</ShipTo>
      <PCount>2</PCount>
      <SWeight>30</SWeight>
      <UOM>KG</UOM>
    </SInfo>
    </Ship>
    The requirement of the xslt is to convert the xml to a flat-file structure. The output for the above example should be flat file with value as below,
    ABC00041003577  75 KG
    ABC00041003002  30 KG
    The lengths of the fields are mentioned below,
    Length of SegmentIdentifier field - 3
    Length of ShipTo field - 10
    Length of PCount field - 3
    Length of SWeight field - 4
    Length of UOM field - 2
    So based on these lengths in the flatfile o/p shown above, the first 3 characters represent 'SegmentIdentifier', next 10 represent 'ShipTo' etc. If the field is of lesser length, then they should be replaced by spaces.
    Take the first line of the flatfile output,
    ABC00041003577  75 KG
    This is basically arrived using the following condition, we should check for the all the SInfo segment having same 'ShipTo' field and then once that is identified, we should basically sum the corresponding PCount (232=7) and SWeight (302520=70) and append it to the flatfile.
    But if the ShipTo is unique then each segment should have a separate line (as seen in the second line of the flat-file)
    I hope i have written my requirement clearly, if i get some help on this, i can build upon this xslt and go ahead coding the rest.
    thanks
    Sameer
    Message was edited by: Sammy

    Hi Sammy,
    I found a solution with 2 styles, one sorting, one recursiv. It was not easy...
    First
    [code]
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <Ship>
                   <xsl:for-each select="//SInfo">
                        <xsl:sort select="ShipTo" order="ascending" data-type="number"/>
                        <xsl:copy-of select="."/>
                   </xsl:for-each>
              </Ship>
         </xsl:template>
    </xsl:stylesheet>
    [/code]
    Second
    [code]
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="text" omit-xml-declaration="yes" media-type="text/plain"/>
         <xsl:template match="/">
              <xsl:call-template name="row">
                   <xsl:with-param name="ShipTo" select="0"/>
              </xsl:call-template>
         </xsl:template>
         <xsl:template name="row">
              <xsl:param name="ShipTo"/>
              <xsl:variable name="ConstShipTo">
                   <xsl:value-of select="$ShipTo"/>
              </xsl:variable>
              <xsl:if test="$ShipTo != 0 ">
                   <xsl:value-of select="//SegmentIdentifier[../ShipTo=$ShipTo]"/>
                   <xsl:value-of select="$ShipTo"/>
                   <xsl:value-of select="sum(//PCount[../ShipTo=$ConstShipTo])"/>
                   <xsl:text> </xsl:text>
                   <xsl:value-of select="sum(//SWeight[../ShipTo=$ConstShipTo])"/>
                   <xsl:text> </xsl:text>
                   <xsl:value-of select="//UOM[../ShipTo=$ShipTo]"/>
                   <xsl:text>
    </xsl:text>
              </xsl:if>
              <xsl:if test="//ShipTo > $ShipTo">
                   <xsl:call-template name="row">
                        <xsl:with-param name="ShipTo" select="//ShipTo [. > $ShipTo]"/>
                   </xsl:call-template>
              </xsl:if>
         </xsl:template>
    </xsl:stylesheet>
    [/code]
    Regards,
    Udo
    and thx for the 10 pts

  • Error while transforming XSLT by calling function with Reflection API

    Hi,
    I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
    If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
    Following is code of reflection to invoke function
            ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
            URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
            Class c = loader.loadClass(fullClasspath);
            Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
            Object instance = constructor.newInstance(constructorParams);
            Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
            Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
    public Document myTransform ( Document document ) {
    // Reference of Document (DOM NODE) used to hold the result of transformation.
                Document doc = null ;
                // DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
                // Reference of DocumentBuilder used to create new Document (DOM NODE).
                DocumentBuilder builder;
                try {
                      // Initialize DocumentBuilder by using DocumentBuilderFactory instance.
                      builder = factory.newDocumentBuilder ();
                      // Initialize new document instance by using DocumentBuilder instance.
                      doc = builder.newDocument () ;
                      // Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
                      DOMSource domsource = new DOMSource ( document ) ;
                      // Creates new instance of TransformerFactory.
                      TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
                      // Creates new Transformer instance by using TransformerFactory which holds XSLT file.
                      Transformer transformer = null;
    ********* exception is thrown from here onward ******************
                      transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
                      // Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
                      transformer.transform ( domsource , new DOMResult ( doc ) ) ;
                } catch (ParserConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerException ex) {
                     ex.printStackTrace();
                } catch (Exception ex) {
                     ex.printStackTrace();
                //holds result of transformation.
                return doc ;
    }Following is full exception stacktrace
    ERROR:  'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
            at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
            at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
            at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
            at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            ...........

    Hi,
    Thanks for response.
    Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
    Document requestObj = /* my code for generating Document object*/
    Object[] methodParams = new Object[]{requestObj}
    Class[] methodParamsClasses = new Class[]{};
                if (methodParams != null) {
                    methodParamsClasses = new Class[methodParams.length];
                    for (int i = 0; i < methodParams.length; i++) {
                        if (methodParams[i] instanceof Document) {
    /************** if parameter is instance of Document then I set class type as "Document.class" ***********/
                            methodParamsClasses[i] = Document.class;
                        } else {
                            methodParamsClasses[i] = methodParams.getClass();

  • Xslt mapping - xsl if ?

    HI,
    can you explain me "how to use the xsl if function" ?
    My source is an ORDRSP Idoc and i want to use the following.
    IF E1EDP20 is existing then ....
    and
    IF E1EDP20/WMENG = 0 then ...
    anyway... is there an option to test the xslt mapping with XML spy or another tool ?
    any ideas ?

    Hi Gordon
    <xsl:if test="string-length(//E1EDP20)!=0 and //E1EDP20/WMENG=0"><then>show</then></xsl:if>
    Open XML at Spy and choose Assign XSL from menu. Press F10 for execute.
    Regards,
    Udo

  • XSLT, problem with HTML

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

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

  • Error in XSLT Code

    Hi All,
    I am working for a scenario with XSLT Mapping(For converting xml to html).
    I get data into a field D_TXT with S_TXT as parent node. The data in D_TXT is space delimited. I need to split the data in D_TXT for every space in data and print the data items separatly in a row of table.
    The code I wrote is:
    "" <xsl:template name="temp">
      <xsl:param name="x"/>
      </xsl:template>
    <xsl:template match="/">
    <xsl:for-each select="Root/S_TXT">
    <tr>
    <xsl:call-template name="temp">
    <xsl:with-param name="x" select="D_TEXT"/>
    </xsl:call-template>
    <xsl:for-each select=" $x [string-length('$x')  &gt; '0'] ">
    <td><tt> <xsl:value-of select="substring-before($x,' ')"/></tt></td>
          <xsl:call-template name="temp">
           <xsl:with-param name="x" select="substring-after($x,' ')"/>
           </xsl:call-template>
    </xsl:for-each>
    </tr>
    </xsl:for-each>
    </table>
    </xsl:template>  ""
    The output I got is improper values in table.
    Can u please correct the error in this code.
    Thanks in advance.
    Regards,
    Lakshmi.

    The XSLT service is configurable.
    http://help.adobe.com/en_US/LiveCycle/9.5/WorkbenchHelp/WS92d06802c76abadb-1cc35bda128261a 20dd-6750.html
    1) Stop LiveCycle.
    2) Add the .jars of your XSLT processor of choice to the LiveCycle server lib folder.
    3) Restart LiveCycle.
    4) Go to Workbench and stop the XSLT service. Right-click on XSLTService:1.0 and Edit Service Configuration.
    5) Enter the factory name for the given XSLT processor. I think for Xalan 2.7.1 it is org.apache.xalan.processor.TransformerFactoryImpl (but I could be wrong).
    6) Restart the service.
    Steve

  • Errror::Illegal number of arguments or types of arguments in XSLT

    HI All,
    In our scenario we are using XSLT mapping with java enhancement.Its working fine in Stylus studio but when the same is imported into XI its throwing the below mentioned error:
                     javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'Trans:Convert'.
    Our requirement is that we are summing up the Field "Grant_Amount" which occurs multiple times in the source structure.PFB the XSL and the source XML:
    <
    XSL:
    ===
    <Sum>
          <xsl:value-of select="Trans:Convert(//Grant_Amount)"/>
    </Sum>
    XML:
    ===
    <Recordset>
          <DETAILRECORD>
             <Grant_Amount>$100.00</Grant_Amount>
          </DETAILRECORD>
          <DETAILRECORD>
             <Grant_Amount>$200.00</Grant_Amount>
          </DETAILRECORD>
    </Recordset>
    Java Code:
    ========
    package com.company.group;
      public class String2Number
          public static String Convert(String[] a)
                          double sum=0;
                          String[] temp = new String[100];
                         for(int i=0;i<a.length;i++)
                                  temp<i> = (a<i>).replaceAll("[,
    $
                                         sum=sum+Double.parseDouble(temp<i>);
                            return sum+"";
    >
    Please guide me into the right solution.
    Thanks and Regards,
    Karanam

    Thanq for your response,
    But my stylesheet is as below
    <
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.infosys.com/sap/xi/projects/sce/n1" xmlns:Trans="com.company.group.String2Number">
         <xsl:template match="/">
              <a:MT_TargetXSLJava>
                   <Record>
                        <Detailrecord>
                             <Sum>
                                  <xsl:value-of select="Trans:Convert(//Grant_Amount)"/>
                             </Sum>
                             <Flag>
                                  <xsl:value-of select="//DETAILRECORD/Grant_Amount"/>
                             </Flag>
                        </Detailrecord>
                   </Record>
              </a:MT_TargetXSLJava>
         </xsl:template>
    </xsl:stylesheet>
    >

  • XSLT and Call transformation

    Hi
    Using <b>XSLT</b> and <b>Call transformation</b> (XSLT scheme) to convert XML file to html the problem is that line breaks in xml are ignored when passing the call tranformation.
    <b>Note in xml look like:</b>
    <com:Note><![CDATA[
    Serie 87% 0,000000
    Amount in this period 01-01-2006 - 01-07-2006 - 180 days
    Currency 16.267.117,38 DKK
    Loan DKK 14.332.700,00
    Debt 7.358.534,23
    Indexsfactor 226,230
    ]]></com:Note>
    <b>When HTML displayed in sap, - note is just a long string which continue out of the screen. Note looks like:</b>Serie 87% 0,000000Amount in this period 01-01-2006 - 01-07-2006 - 180 daysCurrency 16.267.117,38 DKKDebt 7.358.534,23Indexsfactor 226,230
    What to do ? Any ideas ?

    hi Jan,
    Check out the link
    http://www.topxml.com/code/default.asp?p=3&id=v20031025170911&ms=20&l=xsl&sw=categ
    This link contains a file that contains an importable xslt stylesheet with two templates. The first is a text wrap template that breaks texts at carriage returns. You need to modify the xslt.
    [code]<xsl:template name="text.wrap">
            <xsl:param name="texttowrap"/>
            <xsl:variable name="textlength" select="string-length($texttowrap)"/>
            <!-- don't waste time if no text supplied or remaining from recursion-->
            <xsl:if test="$textlength > 0">
                <xsl:choose>
                    <xsl:when test="contains($texttowrap,$CR)">
                        <!-- get the text before the first instance of a carriage return character-->
                        <xsl:variable name="<span  style="background-color:yellow;color:red;font-weight:bold;">line</span>beforefirst<span  style="background-color:yellow;color:red;font-weight:bold;">break</span>" select="substring-before($texttowrap,$CR)"/>
    .................[/code]
    Hope this helps.
    Regards,
    Richa

  • How to pass some default values in all elements which are blank in xslt.

    Hi,
    Help needed:
    Scenario:
    After .xslt transformation, there are some elements which are being mapped but left blank. I want to assign some default values to it like '0'. How to do that.
    Thanks.

    One solution would be something like this...
    http://remysharp.com/2008/08/15/how-to-default-a-variable-in-xslt/
    Or you can use a template like this...
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="node()|@*">
         <xsl:copy>
           <xsl:apply-templates select="node()|@*"/>
         </xsl:copy>
    </xsl:template>
    <xsl:template match="Title">
        <xsl:choose>
            <xsl:when test="string-length(normalize-space(.)) = 0">
                <Title>default</Title>
            </xsl:when>
            <xsl:otherwise>
                <xsl:copy-of select="."/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>For every empty "Title" node, this template will add <Title>default</Title>... If the Title has value it won't be changed... You can change this to your fields/your defaults... If you need default for other field just add another template in the same transformation...
    Cheers,
    Vlad

  • For each in xslt

    From the attachment, The 'string' element under the record 'AoIAgeGroups' is set to unbounded.
    I am working on xslt, want to loop through every element of string and display as output.
    The xslt is as below:
    <types:Line>Age Groups:</types:Line>
      <xsl:for-each select="s1:AoIAgeGroups/s3:string">
       <types:Line><xsl:value-of select="text()"/></types:Line>
      </xsl:for-each>
    But I am getting only the first element in xml input string. It's not listing everything in it.
    The input xml is as below:
    <AoIAgeGroups xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <b:string>0-5 years</b:string>
    <b:string>6-12 years</b:string>
    <b:string>13-24 years</b:string>
    <b:string>25-65 years</b:string>
    <b:string>65+ years</b:string>
    </AoIAgeGroups>
    Currently it's listing only the 0-5 years of the input xml string. I want to list out all others so the output will be
    0-5 years
    6-12 years
    13-24 years
    25-65 years
    65+ years

    <?xml version="1.0" encoding="utf-16" ?>
    - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 s1 userCSharp" version="1.0" xmlns:ns0="http://esb/email/2011/01" xmlns:types="http://esb/email/types/2011/01" xmlns:s3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:s2="http://esb/phrc/1" xmlns:s1="http://esb/registration/1" xmlns:s0="http://esb/shared/1" xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp" xmlns:ScriptNS0="http://schemas.microsoft.com/BizTalk/2003/ScriptNS0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    - <xsl:template match="/">
    <xsl:apply-templates select="/s1:Registration" />
    </xsl:template>
    - <xsl:template match="/s1:Registration">
    - <ns0:Plain>
    <types:Subject>Form Submission for Registration</types:Subject>
    - <types:DeliveryReceipt>
    <xsl:text>0</xsl:text>
    </types:DeliveryReceipt>
    - <types:ReadReceipt>
    <xsl:text>0</xsl:text>
    </types:ReadReceipt>
    - <types:From>
    - <xsl:choose>
    - <xsl:when test="string-length(s1:PersonalDetails/s0:ContactDetails/s0:EmailAddress/text()) > 0">
    - <types:EmailAddress>
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:EmailAddress/text()" />
    </types:EmailAddress>
    </xsl:when>
    - <xsl:otherwise>
    <xsl:variable name="var:v6" select="ScriptNS0:Read("eFormsV2" , "DefaultCitizenFromEmail")" />
    - <types:EmailAddress>
    <xsl:value-of select="$var:v6" />
    </types:EmailAddress>
    </xsl:otherwise>
    </xsl:choose>
    <types:DisplayName>Form Submission for Registration</types:DisplayName>
    </types:From>
    - <types:To>
    <xsl:variable name="var:v6" select="ScriptNS0:Read("eFormsV2" , "PHRCRegistrationDepartmentEmail")" />
    - <types:EmailAddress>
    <xsl:value-of select="$var:v6" />
    </types:EmailAddress>
    </types:To>
    <types:Line>The following message has been submitted.</types:Line>
    <types:Line />
    - <!-- Details collected for all types of membership
    -->
    <types:Line>Details:</types:Line>
    <types:Line />
    - <types:Line>
    Name:
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:Title/text()" />
    <xsl:text />
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:FirstName/text()" />
    <xsl:text />
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:Surname/text()" />
    </types:Line>
    <types:Line />
    - <xsl:if test="string-length(s1:PersonalDetails/s0:ContactDetails/s0:EmailAddress/text()) > 0">
    - <types:Line>
    Email:
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:EmailAddress/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    - <xsl:if test="string-length(s1:PersonalDetails/s0:ContactDetails/s0:MobilePhone/text()) > 0">
    - <types:Line>
    Mobile Phone:
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:MobilePhone/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    - <types:Line>
    Type of Membership:
    <xsl:value-of select="s1:TypeOfMembership/text()" />
    </types:Line>
    <types:Line />
    - <!-- Home details only collected for Professionals and students
    -->
    - <xsl:if test="s1:TypeOfMembership/text() = 'Student' or s1:TypeOfMembership/text() = 'Professional'">
    <types:Line />
    - <xsl:if test="string-length(s1:PersonalDetails/s0:ContactDetails/s0:HomePhone/text()) > 0">
    - <types:Line>
    Home Phone:
    <xsl:value-of select="s1:PersonalDetails/s0:ContactDetails/s0:HomePhone/text()" />
    </types:Line>
    <types:Line />
    </xsl:if>
    <types:Line>Address:</types:Line>
    - <xsl:if test="string-length(s1:PersonalDetails/s0:AddressDetails/s0:BusinessName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:BusinessName/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:PersonalDetails/s0:AddressDetails/s0:HouseName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:HouseName/text()" />
    </types:Line>
    </xsl:if>
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:HouseNumber/text()" />
    <xsl:text />
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:Street/text()" />
    </types:Line>
    - <xsl:if test="string-length(s1:PersonalDetails/s0:AddressDetails/s0:Locality/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:Locality/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:PersonalDetails/s0:AddressDetails/s0:Town/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:Town/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:PersonalDetails/s0:AddressDetails/s0:County/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:County/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:PersonalDetails/s0:AddressDetails/s0:PostCode/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:PersonalDetails/s0:AddressDetails/s0:PostCode/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    </xsl:if>
    - <!-- Course Details are only collected for students
    -->
    <types:Line />
    - <xsl:if test="s1:TypeOfMembership/text() = 'Student'">
    - <types:Line>
    Course Title:
    <xsl:value-of select="s1:CourseDetails/s2:CourseTitle/text()" />
    </types:Line>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Department/text()) > 0">
    - <types:Line>
    Department:
    <xsl:value-of select="s1:CourseDetails/s2:Department/text()" />
    </types:Line>
    </xsl:if>
    - <types:Line>
    College / University:
    <xsl:value-of select="s1:CourseDetails/s2:EstablishmentName/text()" />
    </types:Line>
    <types:Line />
    <types:Line>College / University Address:</types:Line>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Address/s0:BusinessName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:BusinessName/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Address/s0:HouseName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:HouseName/text()" />
    </types:Line>
    </xsl:if>
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:HouseNumber/text()" />
    <xsl:text />
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:Street/text()" />
    </types:Line>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Address/s0:Locality/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:Locality/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Address/s0:Town/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:Town/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Address/s0:County/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:County/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:Address/s0:PostCode/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:Address/s0:PostCode/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    - <types:Line>
    Tutors contact no.:
    <xsl:value-of select="s1:CourseDetails/s2:Tutor/s0:ContactDetails/s0:WorkPhone/text()" />
    </types:Line>
    <types:Line />
    - <types:Line>
    Tutors email address:
    <xsl:value-of select="s1:CourseDetails/s2:Tutor/s0:ContactDetails/s0:EmailAddress/text()" />
    </types:Line>
    <types:Line />
    <types:Line>Term time address:</types:Line>
    - <xsl:if test="string-length(s1:CourseDetails/s2:TermTimeAddress/s0:BusinessName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:BusinessName/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:TermTimeAddress/s0:HouseName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:HouseName/text()" />
    </types:Line>
    </xsl:if>
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:HouseNumber/text()" />
    <xsl:text />
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:Street/text()" />
    </types:Line>
    - <xsl:if test="string-length(s1:CourseDetails/s2:TermTimeAddress/s0:Locality/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:Locality/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:TermTimeAddress/s0:Town/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:Town/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:TermTimeAddress/s0:County/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:County/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:CourseDetails/s2:TermTimeAddress/s0:PostCode/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:CourseDetails/s2:TermTimeAddress/s0:PostCode/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    </xsl:if>
    - <xsl:if test="s1:TypeOfMembership/text() = 'Professional'">
    <types:Line />
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:ProfessionalCategory/text()) > 0">
    - <types:Line>
    Professional Category:
    <xsl:value-of select="s1:ProfessionalDetails/s2:ProfessionalCategory/text()" />
    </types:Line>
    <types:Line />
    </xsl:if>
    - <types:Line>
    Line Managers Name:
    <xsl:value-of select="s1:ProfessionalDetails/s2:LineManager/s0:ContactDetails/s0:FirstName/text()" />
    </types:Line>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:LineManager/s0:ContactDetails/s0:WorkPhone/text()) > 0">
    - <types:Line>
    Line Managers No.:
    <xsl:value-of select="s1:ProfessionalDetails/s2:LineManager/s0:ContactDetails/s0:WorkPhone/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    </xsl:if>
    - <!-- Employment details only collected for professional and leaflet members
    -->
    - <xsl:if test="s1:TypeOfMembership/text() = 'Professional' or s1:TypeOfMembership/text() = 'Only want to order leaflets'">
    <types:Line />
    - <types:Line>
    Job Title:
    <xsl:value-of select="s1:ProfessionalDetails/s2:JobTitle/text()" />
    </types:Line>
    <types:Line />
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Department/text()) > 0">
    - <types:Line>
    Department:
    <xsl:value-of select="s1:ProfessionalDetails/s2:Department/text()" />
    </types:Line>
    <types:Line />
    </xsl:if>
    - <types:Line>
    Organisation:
    <xsl:value-of select="s1:ProfessionalDetails/s2:Organisation/text()" />
    </types:Line>
    <types:Line />
    <types:Line>Address:</types:Line>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Address/s0:BusinessName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:BusinessName/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Address/s0:HouseName/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:HouseName/text()" />
    </types:Line>
    </xsl:if>
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:HouseNumber/text()" />
    <xsl:text />
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:Street/text()" />
    </types:Line>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Address/s0:Locality/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:Locality/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Address/s0:Town/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:Town/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Address/s0:County/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:County/text()" />
    </types:Line>
    </xsl:if>
    - <xsl:if test="string-length(s1:ProfessionalDetails/s2:Address/s0:PostCode/text()) > 0">
    - <types:Line>
    <xsl:value-of select="s1:ProfessionalDetails/s2:Address/s0:PostCode/text()" />
    </types:Line>
    </xsl:if>
    <types:Line />
    - <types:Line>
    Work telephone numbers:
    <xsl:value-of select="s1:ProfessionalDetails/s2:PhoneNumbers/text()" />
    </types:Line>
    <types:Line />
    </xsl:if>
    <types:Line />
    - <types:Line>
    Confirmation box name:
    <xsl:value-of select="s1:AcceptanceName/text()" />
    </types:Line>
    <types:Line />
    <types:Line />
    <types:Line>Areas of interest</types:Line>
    <types:Line />
    <types:Line>Age Groups:</types:Line>
    - <xsl:for-each select="s1:AoIAgeGroups/s3:string">
    - <types:Line>
    <xsl:value-of select="text()" />
    </types:Line>
    </xsl:for-each>
    <types:Line />
    <types:Line>Topics:</types:Line>
    - <xsl:for-each select="s1:AoITopics/s3:string">
    - <types:Line>
    <xsl:value-of select="text()" />
    </types:Line>
    </xsl:for-each>
    </ns0:Plain>
    </xsl:template>
    </xsl:stylesheet>
    <?xml version="1.0" encoding="utf-8" ?>
    - <Registration xmlns="http://esb/registration/1" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    - <MetaData xmlns:b="http://esb/shared/1">
    <b:UTRN>W86180141692</b:UTRN>
    <b:EnquiryType i:nil="true" />
    <b:SubType i:nil="true" />
    <b:RequestStatus i:nil="true" />
    <b:RequestSubStatus i:nil="true" />
    <b:CreatedBy i:nil="true" />
    <b:Application i:nil="true" />
    <b:LGNLCategory i:nil="true" />
    <b:FormRef i:nil="true" />
    <b:FormVersion i:nil="true" />
    <b:ProcessStage i:nil="true" />
    <b:CreatedWhen i:nil="true" />
    <b:CreatedWhere i:nil="true" />
    <b:CreatedHow i:nil="true" />
    <b:SentFlag i:nil="true" />
    </MetaData>
    - <PersonalDetails xmlns:b="http://esb/shared/1">
    - <b:ContactDetails>
    <b:Title>Mr</b:Title>
    <b:FirstName>f</b:FirstName>
    <b:Surname>surname</b:Surname>
    <b:EmailAddress>[email protected]</b:EmailAddress>
    <b:HomePhone />
    <b:MobilePhone>m</b:MobilePhone>
    <b:WorkPhone i:nil="true" />
    <b:Fax i:nil="true" />
    <b:Minicom i:nil="true" />
    <b:PreferredContact i:nil="true" />
    </b:ContactDetails>
    - <b:AddressDetails>
    <b:FlatUnit />
    <b:UPRN>000072532081</b:UPRN>
    <b:BusinessName />
    <b:HouseName />
    <b:HouseNumber>1</b:HouseNumber>
    <b:Locality>Woodhouse</b:Locality>
    <b:Street>Delph Court</b:Street>
    <b:LPILevel />
    <b:Town>Leeds</b:Town>
    <b:County>Leeds</b:County>
    <b:Classification>RD06</b:Classification>
    <b:Country>United Kingdom</b:Country>
    <b:PostCode>LS6 2HL</b:PostCode>
    <b:Ward>Hyde Park and Woodhouse</b:Ward>
    </b:AddressDetails>
    </PersonalDetails>
    - <CourseDetails xmlns:b="http://esb/phrc/1">
    <b:CourseTitle />
    <b:Department />
    <b:EstablishmentName />
    - <b:Address xmlns:c="http://esb/shared/1">
    <c:FlatUnit />
    <c:UPRN i:nil="true" />
    <c:BusinessName />
    <c:HouseName />
    <c:HouseNumber />
    <c:Locality />
    <c:Street />
    <c:LPILevel i:nil="true" />
    <c:Town />
    <c:County />
    <c:Classification i:nil="true" />
    <c:Country i:nil="true" />
    <c:PostCode />
    <c:Ward i:nil="true" />
    </b:Address>
    - <b:Tutor xmlns:c="http://esb/shared/1">
    - <c:ContactDetails>
    <c:Title i:nil="true" />
    <c:FirstName i:nil="true" />
    <c:Surname i:nil="true" />
    <c:EmailAddress />
    <c:HomePhone i:nil="true" />
    <c:MobilePhone i:nil="true" />
    <c:WorkPhone />
    <c:Fax i:nil="true" />
    <c:Minicom i:nil="true" />
    <c:PreferredContact i:nil="true" />
    </c:ContactDetails>
    <c:AddressDetails i:nil="true" />
    </b:Tutor>
    <b:StudentEmailAddress i:nil="true" />
    - <b:TermTimeAddress xmlns:c="http://esb/shared/1">
    <c:FlatUnit />
    <c:UPRN i:nil="true" />
    <c:BusinessName />
    <c:HouseName />
    <c:HouseNumber />
    <c:Locality />
    <c:Street />
    <c:LPILevel i:nil="true" />
    <c:Town />
    <c:County />
    <c:Classification i:nil="true" />
    <c:Country i:nil="true" />
    <c:PostCode />
    <c:Ward i:nil="true" />
    </b:TermTimeAddress>
    </CourseDetails>
    - <ProfessionalDetails xmlns:b="http://esb/phrc/1">
    <b:ProfessionalCategory>Admin/Clerical/Management</b:ProfessionalCategory>
    - <b:LineManager xmlns:c="http://esb/shared/1">
    - <c:ContactDetails>
    <c:Title i:nil="true" />
    <c:FirstName>l</c:FirstName>
    <c:Surname i:nil="true" />
    <c:EmailAddress i:nil="true" />
    <c:HomePhone i:nil="true" />
    <c:MobilePhone i:nil="true" />
    <c:WorkPhone>lmn</c:WorkPhone>
    <c:Fax i:nil="true" />
    <c:Minicom i:nil="true" />
    <c:PreferredContact i:nil="true" />
    </c:ContactDetails>
    <c:AddressDetails i:nil="true" />
    </b:LineManager>
    <b:JobTitle>jt</b:JobTitle>
    <b:Department>d</b:Department>
    <b:Organisation>o</b:Organisation>
    - <b:Address xmlns:c="http://esb/shared/1">
    <c:FlatUnit />
    <c:UPRN>000072532081</c:UPRN>
    <c:BusinessName />
    <c:HouseName />
    <c:HouseNumber>1</c:HouseNumber>
    <c:Locality>Woodhouse</c:Locality>
    <c:Street>Delph Court</c:Street>
    <c:LPILevel />
    <c:Town>Leeds</c:Town>
    <c:County>Leeds</c:County>
    <c:Classification>RD06</c:Classification>
    <c:Country>United Kingdom</c:Country>
    <c:PostCode>LS6 2HL</c:PostCode>
    <c:Ward>Hyde Park and Woodhouse</c:Ward>
    </b:Address>
    <b:PhoneNumbers>wtn</b:PhoneNumbers>
    </ProfessionalDetails>
    <TypeOfMembership>Professional</TypeOfMembership>
    <WhoToldYou>how did you</WhoToldYou>
    <AcceptanceName>please</AcceptanceName>
    - <AoIAgeGroups xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <b:string>0-5 years</b:string>
    <b:string>6-12 years</b:string>
    <b:string>13-24 years</b:string>
    <b:string>25-65 years</b:string>
    <b:string>65+ years</b:string>
    </AoIAgeGroups>
    - <AoITopics xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <b:string>Accident prevention</b:string>
    <b:string>Healthy eating</b:string>
    <b:string>Mental health</b:string>
    <b:string>Parenting / Child health</b:string>
    <b:string>Physical activity</b:string>
    <b:string>Sexual health</b:string>
    <b:string>Substance use</b:string>
    </AoITopics>
    </Registration>

  • How to pass array into xslt from java

    i have a xslt in which i am passing some parameter from java there is one parameter which is a array in java which i need to pass becouse array length is not defined so that xslt will work dynakically according to the parameter.
    right now i am passing parameter but not able to send the array parameter that's why my code is not fully dynamic
    please give suggestion.
    anagh

    it is not possible to pass array by using XSLT, you can wirite all values into a String with certain delim symbol, pass this string, then use xsl.substring() to get different values.

Maybe you are looking for

  • Itunes wiped after system restore - what can I do?

    I know that i was really silly by not backing up my itunes but I was anxious to get laptop fixed so had system restore done and am now wondering if there is any way to get my library off my ipod and into my newly downloaded itunes?

  • Does  Adobe Reader version 10 supports IPC-1752-1 v1.1 pdf file?

    Does Adobe Reader version 10  supports IPC-1752-1 v1.1 pdf file?

  • Exchange services not starting

    Hi everyone, I had a power failure , After power failure i am not able to start Microsoft Exchange IMAP4, Microsoft Exchange Information Store, Microsoft Exchange POP3 services,Microsoft Exchange Service Host services,  I am  using SP2 , can i upgrad

  • How can i set timestamp format

    hello i want to ask how can i set defult timestamp format which should be used wher use TO_TIMESTAMP('2010-11-12 15:14')

  • Connect to gmail server

    I have code to conenction my local mail server..also i can able to mail only in my network from my local pc. i want to send mail outside my mail account like(gmail,yahoo..etc).. can u ple help me out...