Issue copying only Non-Empty element via XSLT Transformation

Below transformation is copying even empty tag :( ...... I want only those tag with value copied.
<xsl:template match="/">
<ns56:ValidateProductForReactivationResponse>
<xsl:if test="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService">
<internetService:InternetService>
<internetService:CustomerUserName>
<xsl:value-of select="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService/internetService:CustomerUserName"/>
</internetService:CustomerUserName>
<internetService:Login>
<xsl:value-of select="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService/internetService:Login"/>
</internetService:Login>
</xsl:if>
</ns56:ValidateProductForReactivationResponse>
</xsl:template>
Please Help.
Regards,
En

Enceladus wrote:
I want something ..some pattern to put in match.. so that is covers whole xslt.Unfortunately, there's no such a thing... Document is quite clear on that point...
+" When mapping an optional source node to an optional target node, it is important to surround the mapping with an xsl:if statement that tests for the existence of the source node. If this is not done and the source node does not exist in the input document, an empty node is created in the target document. "+
http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_xslt_mpr.htm#CFAHAHHA

Similar Messages

  • Updating a DB table with only non-empty values of a work area

    Hi everybody,
    Is that possible in ABAP to update a table in the database with a work area, but only with non-empty values of this work area?
    Example:
    data: ls_custom type ZCUSTOMERS_0.
    ls_custom-CUSTOMER = '20'.
    ls_custom-LASTNAME = 'MyName'.
    ls_custom-FIRSTNAME = ' '.
    ls_custom-CURRENCY = ' '.
    update ZCUSTOMERS_0 from ls_custom.  *" I want that the update clause don't do the update with FIRSTNAME  and CURRENCY fields because they have empty values*
    If it's possible, how to do it?
    Thanks & regards,
    Abdel

    Total Questions:  81 (66 unresolved)
    Hi,
    To my understanding you mean if the database table has values
    customer         20
    lastname          somename
    firstname         firstname
    currency          INR
    so now after this
    data: ls_custom type ZCUSTOMERS_0.
    ls_custom-CUSTOMER = '20'.
    ls_custom-LASTNAME = 'MyName'.
    ls_custom-FIRSTNAME = ' '.
    ls_custom-CURRENCY = ' '.
    update ZCUSTOMERS_0 from ls_custom.
    you want the result as
    customer         20
    lastname          Myname
    firstname         firstname
    currency          INR
    Is it so? Then Normal update
    data: ls_custom type ZCUSTOMERS_0.
    ls_custom-CUSTOMER = '20'.
    ls_custom-LASTNAME = 'MyName'.
    update ZCUSTOMERS_0 from ls_custom.
    would do that.
    Thanks,
    Sri.

  • Mdx : Sum up the measure from start but need only non empty rows

    Hi All
    i have created a calculated measure where it suming up all its previous avaialable values based on Date dimension.
    Everything is working but we are getting all rows from that datetimension . how can get only till current date,
    SUM(NULL:[Date].[Hierarchy].currentmember,[Measures].[SIMID])
    Surendra Thota

    Hi Surendra,
    According to your description, you want to calculate the sum up the measure from start for those non empty rows, right?
    In this case, please try the query below.
    WITH MEMBER [Measures].[Sum from start]
    AS
    SUM ({NULL:[Date].[Calendar].CurrentMember},
    [Measures].[Internet Sales Amount])
    SELECT {[Measures].[Internet Sales Amount],[Measures].[Sum from start]} ON 0 ,
    nonempty([Date].[Calendar].[Calendar Year].MEMBERS) ON 1
    FROM [Adventure Works]
    Result
    Besides, here is a blog which describe various way to calculate running total, please see:
    http://blog.sqltechie.com/2011/01/various-way-to-calculate-running-total.html
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • How can I get report of only non compliant clients via Fileshare or to admin mailbox each day?

    I need to figure out how to get a daily report of non compliant clients in SCCM2012 to admin email or fileshare.
    Is there any built-in report that returns only non compliant clients I could use to accomplish this,
    and create alert subscription or exchange server connector to receive the message / file once a day ?
    Do I need to use SQL Server Reporting Services for this ? New to SCCM and getting confused with all those reports,
    sorry ;-)

    Yes you need SSRS for this.
    This will help.
    http://be.enhansoft.com/post/2013/08/27/How-to-Set-up-a-Windows-File-Share-Subscription.aspx
    http://be.enhansoft.com/post/2013/08/14/How-to-Set-up-an-Email-Subscription-in-SSRS.aspx
    Non compliant for what?
    http://www.enhansoft.com/

  • Update only non empty fields

    Hi everybody,
    I'm trying to develop a trigger-based solution for a project involving received messages from an MQ queue.
    The messages are all inserted from the queue into a single staging table. (v10.2.0.4)
    Each message's data will need to be either inserted or updated to a destination table based upon a field's value in the staging table.
    I was planning on putting a trigger on the staging table and calling an insert or update procedure based on the staging field's value.
    The inserts are pretty straightforward.
    It's the updates that I'm struggling with - some of the staging fields will be populated, others will be empty. There is no pattern to which fields will or will not be populated.
    I do not want to update the destination table with empty fields - I only want to update fields that contain data.
    Is there an better way than several "if-then check for empty, then update" (one for each field)?
    Maybe some sort of magical dynamic update?
    Any help is greatly appreciated.
    Thanks in advance!

    Hi,
    You can use the NVL function (or COALESCE), which returns the first of its arguments that is NOT NULL.
    Instead of:
    UPDATE  dest
    SET     column_a = x
    ,       column_b = y
    WHERE   id = z;say
    UPDATE  dest
    SET     column_a = NVL (x, column_a)
    ,       column_b = NVL (y, column_b)
    WHERE   id = z;If x IS NOT NULL, then NVL (x, column_a) will return x.
    If x IS NULL, then NVL (x, column_a) will return column_a
    You could also automate this in a BEFORE UPDATE trigger:
    :NEW.column_a := NVL (:NEW.column_a, :OLD.column_a);
    :NEW.column_b := NVL (:NEW.column_a, :OLD.column_b);but if you do, you'll have to disable the trigger to correct mistakes that really should be NULL.

  • Display only non empty table

    Hi ,
    I have a read only table in a jspx page. In case there is some error or there are no rows to display , I dont want to display the table. Just a label with some text.
    There is a emptyText which checks if there are "no rows yet" , but it displays all the table headers etc and then displays the text.
    Is there a way I can put in a check to display table only if records are present.
    Thanks.
    Amit

    Hi Amit,
    I would suggest you to make use of switcher instead of setting the visible property as in your case you not only want to show/hide the table based on some condition but also you want to toggle between a table or an output text based on some condition.
    When switcher is used, based on the condition it evaluates which component to render in the component hierarchy since you don't want to load(render) a component when you don't want to make it available to the user.
    There is a good example on how to use switcher component in this blog
    Hope it helps.
    Thanks & Regards,
    ~Krithika

  • Wrong results for context search on empty element tags

    I'm using Oracle DBMS 11.1 and 11.2 and created a context index on an XML column (section group: PATH_SECTION_GROUP).
    When entering a query like
    SELECT count(*) FROM my_table t WHERE contains (t.co_xml,'hasPath(/tag1/tag2)') > 0
    I get wrong results if tag2 is an empty element tag (<tag2/>) that appears somewhere within the
    XML instance, but NOT directly under tag1.
    E.g., the following XML instance is found (but shouldn't!):
    <a>
    <tag1>bla<tag3>bla</tag3></tag1>
    <tag4>bla<tag2/></tag4>
    </a>
    This seems to happen only for empty element tags. Is this a known bug and does anybody know a workaround?
    Thanks in advance for your help!
    Roman

    I am unable to reproduce the problem. Can you provide a copy and paste of an actual run, including create table, insert data, create index, and select, as I have done below?
    SCOTT@orcl_11g> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SCOTT@orcl_11g> create table my_table
      2    (co_xml     xmltype)
      3  /
    Table created.
    SCOTT@orcl_11g> insert into my_table values (
      2  xmltype ('<?xml version="1.0"?>
      3  <tag5>
      4    <tag1>bla<tag3>bla</tag3></tag1>
      5    <tag4>bla<tag2/></tag4>
      6  </tag5>'))
      7  /
    1 row created.
    SCOTT@orcl_11g> create index my_idx
      2  on my_table (co_xml)
      3  indextype is ctxsys.context
      4  parameters ('section group ctxsys.path_section_group')
      5  /
    Index created.
    SCOTT@orcl_11g> SELECT count(*)
      2  FROM   my_table t
      3  WHERE  contains (t.co_xml, 'hasPath (//tag1/tag2)') > 0
      4  /
      COUNT(*)
             0
    SCOTT@orcl_11g> SELECT count(*)
      2  FROM   my_table t
      3  WHERE  contains (t.co_xml, 'hasPath (//tag1/tag3)') > 0
      4  /
      COUNT(*)
             1
    SCOTT@orcl_11g>

  • OSB: Payload validation required for empty elements inside OSB process.

    Hello
    I need to validate the payload for non-empty elements. If the payload is completely empty then OSB should throw an error that the submitted payload is empty.
    If the payload contains at least one element then it should pass through.
    As in process to test this particular one, i have tried with the following code to generally validate for an element.
    xquery version "1.0" encoding "Cp1252";
    (:: pragma bea:global-element-parameter parameter="$inputParameters1" element="ns0:InputParameters" location="../adapter/StoreProcDB/xsd/StoreProcDBService_sp.xsd" ::)
    (:: pragma bea:schema-type-return type="ns1:Validation" location="../xsd/validation.xsd" ::)
    declare namespace xf = "http://tempuri.org/StoreProc_osb/transformation/PayloadValidation/";
    declare namespace ns1 = "http://www.sigmainfo.com/validation";
    declare namespace ns0 = "http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService";
    declare function xf:PayloadValidation($inputParameters1 as element(ns0:InputParameters))
    as element()
    <ns1:Validation>
              <ns1:Payload>{$inputParameters1/.}</ns1:Payload>
              <ns1:ValidationErrorList>
                   (: BEGIN - Required Field Validations :)
              (:     if (empty($inputParameters1/ns0:ACCOUNTNUMBER/text())) then
                        <ns1:ValidationError>
                             <ns1:code>1</ns1:code>
                             <ns1:message>ACCOUNTNUMBER: Required Field</ns1:message>
                        </ns1:ValidationError> :)
                   if (empty($inputParameters1/ns0:AUDITUSER/text())) then
                        <ns1:ValidationError>
                             <ns1:code>1</ns1:code>
                             <ns1:message>AUDITUSER: Required Field</ns1:message>
                        </ns1:ValidationError>
                   else ''
                   (: END - Required Field Validations :)
    </ns1:ValidationErrorList>
         </ns1:Validation>
    declare variable $inputParameters1 as element(ns0:InputParameters) external;
    xf:PayloadValidation($inputParameters1)
    But it throws the following error:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    REQUEST DOCUMENT:
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <soapenv:Body>
    <stor:InputParameters
    xmlns:stor="http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService">
    <!--Optional:-->
    <stor:P_ACCOUNTNUMBER>00101</stor:P_ACCOUNTNUMBER>
    <!--Optional:-->
    <stor:P_AUDITUSER>venkat</stor:P_AUDITUSER>
    </stor:InputParameters>
    </soapenv:Body>
    </soapenv:Envelope>
    RESPONSE DOCUMENT:
    The invocation resulted in an error: . <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>BEA-382505: OSB Validate action failed validation</faultstring><detail><con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382505</con:errorCode>
    <con:reason>OSB Validate action failed validation</con:reason>
    <con:details>
    <con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:message>
    Incompatible elements: expected an XML instance of name "{http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService}InputParameters", but found an XML instance of name "{http://schemas.xmlsoap.org/soap/envelope/}Body".
    </con1:message>
    <con1:xmlLocation/>
    </con1:ValidationFailureDetail>
    </con:details>
    <con:location>
    <con:node>PipelinePairNode1</con:node>
    <con:pipeline>PipelinePairNode1_request</con:pipeline>
    <con:stage>stage1</con:stage>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    But this is not the way it should be done as i progress.
    Please suggest a simple way to have a pragma with sample and complete validation for the input payload.
    Appreciate your help in advance
    Regards
    Venkat

    Venkat,
    Find below url's for implementing security policies in OSB
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDEEGJI
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDBIJHD
    http://niallcblogs.blogspot.in/2010/07/osb-11g-and-wsm.html
    http://biemond.blogspot.in/2009/06/ws-security-in-osb.html
    Regards,
    Abhinav

  • XSLT Transformation problem

    Hi,
    hope anybody can help.
    I try to transform a object to another object via XSLT transformation.
    Here is my coding :
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_export TYPE abap_trans_resbind_tab,
            wa_export TYPE abap_trans_resbind.
      DATA: obj_data TYPE REF TO data.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
    * Create table with internal structure
      CREATE DATA e_data TYPE (wa_transformation-structure_name).
      wa_import-name = 'IMPORT'.
      GET REFERENCE OF i_data INTO wa_import-value.
      APPEND wa_import TO obj_import.
    * Call transformation
      CALL TRANSFORMATION (wa_transformation-transformation)
      SOURCE (obj_import)
      RESULT (obj_export).
    i_data is a import parameter from type "ref to data".
    My problem is, that "Call transformation" makes a shortdump when calling them.
    Regards,
    Anton

    Found a solution for my problem. Now it works!
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_data TYPE REF TO data.
      DATA: wa_return TYPE bapiret2.
      FIELD-SYMBOLS: <data> TYPE ANY TABLE.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
      IF sy-subrc IS INITIAL.
    * Create table with internal structure
        CREATE DATA e_data TYPE STANDARD TABLE OF (wa_transformation-structure_name).
        ASSIGN i_data->* TO <data>.
        wa_import-name = 'IMPORT'.
        GET REFERENCE OF <data> INTO wa_import-value.
        APPEND wa_import TO obj_import.
    * Call transformation
        CALL TRANSFORMATION (wa_transformation-transformation)
        SOURCE (obj_import)
        RESULT export_data = e_data.
      ELSE.
        MOVE:  'Y0_DPL' TO wa_return-id,
               'E'      TO wa_return-type,
               '108'    TO wa_return-number.
        APPEND wa_return TO e_return.
        CLEAR: wa_return.
      ENDIF.

  • Need to exclude the empty elements after mapping in xslt.

    Hi Team,
    I have a requirement. I need to invoke a wsdl which will have some po details. I'm using transformation to map the value from my local bpel variable to invoke variable. It is mostly a one-one mapping. no functions no looping and no complex transformation. Now the requirement is that I need to only send the elements which has the value also to add, there is no particular element which can be empty. There can be three elements empty or four or any. I need to map all and then I need to send only the elements those has values. Below is my mapping.
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="POTest.xsd"/>
          <rootElement name="POTestProcessResponse" namespace="http://xmlns.oracle.com/POTest"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="POTest.xsd"/>
          <rootElement name="POTestProcessResponse" namespace="http://xmlns.oracle.com/POTest"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [THU OCT 17 10:53:26 GMT 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:ns1="http://xmlns.oracle.com/POTest"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
                    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
                    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    exclude-result-prefixes="xsl ns1 ns0 xref xp20 bpws ora ehdr orcl ids hwf">
      <xsl:template match="/">
        <ns1:POTestProcessResponse>
          <xsl:attribute name="OrderDate">
            <xsl:value-of select="/ns1:POTestProcessResponse/@OrderDate"/>
          </xsl:attribute>
          <ns1:name>
            <xsl:value-of select="/ns1:POTestProcessResponse/ns1:name"/>
          </ns1:name>
          <ns1:street>
            <xsl:value-of select="/ns1:POTestProcessResponse/ns1:street"/>
          </ns1:street>
          <ns1:city>
            <xsl:value-of select="/ns1:POTestProcessResponse/ns1:city"/>
          </ns1:city>
          <ns1:state>
            <xsl:value-of select="/ns1:POTestProcessResponse/ns1:state"/>
          </ns1:state>
          <ns1:zip>
            <xsl:value-of select="/ns1:POTestProcessResponse/ns1:zip"/>
          </ns1:zip>
        </ns1:POTestProcessResponse>
      </xsl:template>
      </xsl:stylesheet>
    Here I just mentioned only some elements but there are lot of other elements which can also be empty. If I keep on putting an if condition for each and every element it will messup the code. which I don't want to do due to lot of elements that needs to be checked. I tried with following templates.
    1)
    <xsl:template match="*[not(child::node())]"/>
      <xsl:template match="@*|node()">
    <xsl:if test=". != '' or ./@* != ''">
       <xsl:copy>
         <xsl:apply-templates select="@*|node()" />
       </xsl:copy>
    </xsl:if>
    </xsl:template>
    2)
    <xsl:output omit-xml-declaration="yes" indent="yes"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="*[not(node())]
      |
       *[not(node()[2])
       and
         node()/self::text()
       and
         not(normalize-space())
      "/>
    3)
    <xsl:template match="/">
        <xsl:apply-templates select="*"/>
      </xsl:template>
      <xsl:template match="*">
        <xsl:if test=". != ''">
          <xsl:copy>
            <xsl:element name="name()">
              <xsl:copy-of select="@*"/>
              <xsl:apply-templates/>
            </xsl:element>
          </xsl:copy>
        </xsl:if>
      </xsl:template>
    But none of them is working. Kindly help. It is the only issue which is blocking.
    Help is greatly appreciated.
    Regards,
    Venkatesh.

    I received the following errors:
      Line Number:(55) : Error: "xsl:strip-space" XSL Element Currently not Supported
      Line Number:(31) : Error: <xsl:template match="/"> and <xsl:template name="..."> are the only permitted <template> elements in the XSL
      Line Number:(53) : Error: <xsl:template match="/"> and <xsl:template name="..."> are the only permitted <template> elements in the XSL
      Line Number:(56) : Error: <xsl:template match="/"> and <xsl:template name="..."> are the only permitted <template> elements in the XSL
    Below is the complete transformation code.:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="POTest.xsd"/>
          <rootElement name="POTestProcessRequest" namespace="http://xmlns.oracle.com/POTest"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="POTest.xsd"/>
          <rootElement name="POTestProcessResponse" namespace="http://xmlns.oracle.com/POTest"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [THU OCT 17 10:20:35 GMT 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:ns1="http://xmlns.oracle.com/POTest"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
                    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
                    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    exclude-result-prefixes="xsl ns1 ns0 xref xp20 bpws ora ehdr orcl ids hwf">
      <xsl:template match="/">
          <ns1:POTestProcessResponse>
          <xsl:attribute name="OrderDate">
            <xsl:value-of select="/ns1:POTestProcessRequest/@OrderDate"/>
          </xsl:attribute>
          <ns1:name>
            <xsl:value-of select="/ns1:POTestProcessRequest/ns1:name"/>
          </ns1:name>
          <ns1:street>
            <xsl:value-of select="/ns1:POTestProcessRequest/ns1:street"/>
          </ns1:street>
          <ns1:city>
            <xsl:value-of select="/ns1:POTestProcessRequest/ns1:city"/>
          </ns1:city>
          <ns1:state>
            <xsl:value-of select="/ns1:POTestProcessRequest/ns1:state"/>
          </ns1:state>
          <ns1:zip>
            <xsl:value-of select="/ns1:POTestProcessRequest/ns1:zip"/>
          </ns1:zip>
        </ns1:POTestProcessResponse>
      </xsl:template>
        <xsl:strip-space elements="*" />
    <xsl:template match="*">
    <xsl:if test=".!='' or count(@*)!=0">
      <xsl:copy>
       <xsl:apply-templates select="*|@*|text()" />
      </xsl:copy>
    </xsl:if>
    </xsl:template>
    <xsl:template match="@*">
    <xsl:copy-of select="." />
    </xsl:template>
    <xsl:template match="text()">
    <xsl:value-of select="." />
    </xsl:template>
    </xsl:stylesheet>

  • Are optional (non-existing) elements ALWAYS copied to target in TransformXS

    Assume I use the TransformXSL activity to copy a structure from source XSD to target XSD.
    Some of the elements are specified as optional.
    Say for a particular situation some of these optional elements in the source XML do NOT exist.
    It seems to me that TransformXSL mapping creates these elements in the target
    structure and fill them with empty value.
    This is a problem. I don't want them to be created if they do not exist in
    the source XML.
    How can I prevent the creation of non-existing elements in a TransformXSL operation
    otherwise? Is there an option for this?
    Michael

    James,
    thank you for this first answer.
    Is there a way to enter your "if" clause visually through JDeveloper GUI (=NOT in the XSL source code directly) ?
    Is there a way to specify this "if" clause for ALL elements of a TransformXSL and not only for one particular one?
    It would be rather uncomfortable to enter this for hundreds of optional elements individually.
    Michael Haertfelder

  • XSLT Transformation error:  Non-canonical structure of element name

    Good day experts,
    I have recently started using xslt, and came upon the following demo in the sdn.
    http://wiki.sdn.sap.com/wiki/display/ABAP/XMLXSLTwith+ABAP
    I have retrieved the example xml files from airplus.com, as per the instructions, and implemented the code.
    When I test the xslt transformation in se80, it transforms correctly.
    However, when I run the program, I get the following error.
    CX_XSLT_FORMAT_ERROR
    Transformation error:  Non-canonical structure of element name XML_OUTPUT   
    Is there an error in the example that I am not aware of?
    Thanks in advance,
    Johan Kriek

    Found the solution.
    You rename the tag <XML_OUTPUT> to anything else like <TEST>. And Hurray!!! it works.
    It looks like SAP is using this name internally somewhere so we are getting error when we are using same name.
    Anyways the problem is solved.
    Regards,
    Jai

  • D7360 won't print in "Black Only", unless color cartridges are also non-empty

    I'm trying to print a document in grayscale mode using D7360 Photosmart printer.
    In the printing setup dialog am explicitly checking the option to use "Black Print Cartridge Only".
    The printer refuses to print, saying:
    "The following ink cartridges are empty: Light Cyan. Replace these ink cartridges to resume printing."
    "The printer does not have enough ink to ensure printer's health. The empty ink cartridges must be replaced to resume."
    Does this mean that even though it is not using the color cartridges, all of them have to be non-empty when the printer is operating?
    This question was solved.
    View Solution.

    I think I solved the problem for my PC. I put in a new black cartridge but my color cartridge is empty. My printouts started looking awful and were trying to print in blue. I went to the printer area of the control panel and requested grey scale only. Suddenly my printouts look great, as they did before. I'm running Vista on a Compaq with an HP deskjet D1560 printer.

  • HT1766 I purchased an iPad air and chose a backup from my iPhone 5s.  The only issue is only 30 of my photos downloaded to my iPad and none of the music.  How can I get all items on the iPad?

    I purchased an iPad air and chose a backup from my iPhone 5s.  The only issue is only 30 of my photos downloaded to my iPad and none of the music.  How can I get all items on the iPad?

    you are using I tunes as the middle man for this back up, right?
    When you plug in the pad to i tunes, give it a unique name, like my pad.  I tune may be thinking it is talking to your phone.  It will keep track of what you what on each device.  Then plug your phone back in, and make sure your photos are uploaded to the computer - in i photo if you are using a mac, or in whatever photo program you are using on a windows device.  You also want to make sure you have uploaded to the computer all of your music.
    Once you get all that stuff there, plug the pad back in, and go through each of the tabs - selecting the music, photos etal that you want on the pad, then resync.

  • DB copy from non-clustered JAVA only to MSCS clustered JAVA only?

    Hi!
    We have 2 EP7.0  based on SQL server ready for DB copy.
    The source EP7.0 is non-clustered
    The target EP7.0 is MSCS clustered.
    The guide called "System Copy for SAP Systems Based on NW 7.0 SR2 Java"
    does not have any coverage on this scenario.
    Could you direct me to some related documents?
    Thanks a lot!

    Thanks!
    However I want to give more details.
    I have done DB copy between non-clustered systems many times. For example I just
    finished 2 recently. The procedure is
    1) export CI from the source
    2) export SQL server DB from the source
    3) restore the DB onto the target
    4) import the CI into the target.
    Now the challenge is the source is a non-clustered EP, the target is an MSCS clustered
    EP.  Both are running with  the same SID.
    My question is :
    Do I need to do 1) and 4) in the current scenario? i.e. Do I need to do CI export /import?
    If YES, becuase the source is a central system, I have to choose "DB and CI export".
    But because the target is a clustered (distributed?) one,   the import will match?
    Thanks!

Maybe you are looking for