xml - xslt issue in multiheader and multiline -


i have xml have multiple sequencer when loop header , line not matching please find below input , output xsd using soa 11g jdeveloper 11.1.7

<xsd:element name="processrequest">    <xsd:complextype>       <xsd:sequence maxoccurs="unbounded" minoccurs="3">          <xsd:element name="place" type="bci:disk_hdr_rectype" minoccurs="0"  maxoccurs="unbounded"/>   //multiple line data          <xsd:element name="name" type="xsd:decimal" minoccurs="0" />          <xsd:element name="zipcode" type="bci:disk_dtl_tbltype" minoccurs="0" />          <xsd:element name="state" type="xsd:decimal" minoccurs="0" />       </xsd:sequence>    </xsd:complextype> </xsd:element>  <element name="parametercollection">    <complextype>       <sequence>          <element ref="db:parameters" maxoccurs="unbounded"/>       </sequence>        </complextype> </element>  <element name="parameters">    <complextype>       <sequence>          <xsd:element name="namer" type="bci:disk_hdr_rectype" minoccurs="0" />          <xsd:element name="place" type="xsd:decimal" minoccurs="0" />          <xsd:element name="zipcode" type="bci:disk_dtl_tbltype" minoccurs="0" />          <xsd:element name="state" type="xsd:decimal" minoccurs="0" />       </sequence>    </complextype> </element> 

please let me know if can help.

when loop in xslt, place elements getting processed , value doesn't match name. element namel,place,state repeat multiple times in sequence.

xslt       <?xml version="1.0" encoding="utf-8" ?>     <?oracle-xsl-mapper       <!-- specification of map sources , targets, not modify. -->       <mapsources>         <source type="wsdl">           <schema location="../bpelprocess1.wsdl"/>           <rootelement name="process" namespace="http://xmlns.oracle.com/test/testxslt/bpelprocess1"/>         </source>       </mapsources>       <maptargets>         <target type="wsdl">           <schema location="../bpelprocess1.wsdl"/>           <rootelement name="parametercollection" namespace="http://xmlns.oracle.com/test/testxslt/bpelprocess1"/>         </target>       </maptargets>       <!-- generated oracle xsl mapper 11.1.1.6.0(build 111214.0600.1553) @ [wed apr 29 09:16:28 pdt 2015]. -->     ?>     <xsl:stylesheet version="1.0"                     xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"                     xmlns:xp20="http://www.oracle.com/xsl/transform/java/oracle.tip.pc.services.functions.xpath20"                     xmlns:mhdr="http://www.oracle.com/xsl/transform/java/oracle.tip.mediator.service.common.functions.mediatorextnfunction"                     xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"                     xmlns:oraext="http://www.oracle.com/xsl/transform/java/oracle.tip.pc.services.functions.extfunc"                     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"                     xmlns:dvm="http://www.oracle.com/xsl/transform/java/oracle.tip.dvm.lookupvalue"                     xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"                     xmlns:xsl="http://www.w3.org/1999/xsl/transform"                     xmlns:med="http://schemas.oracle.com/mediator/xpath"                     xmlns:ids="http://xmlns.oracle.com/bpel/services/identityservice/xpath"                     xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"                     xmlns:client="http://xmlns.oracle.com/test/testxslt/bpelprocess1"                     xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"                     xmlns:xref="http://www.oracle.com/xsl/transform/java/oracle.tip.xref.xpath.xrefxpathfunctions"                     xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"                     xmlns:xsd="http://www.w3.org/2001/xmlschema"                     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"                     xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"                     xmlns:ora="http://schemas.oracle.com/xpath/extension"                     xmlns:socket="http://www.oracle.com/xsl/transform/java/oracle.tip.adapter.socket.protocoltranslator"                     xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"                     exclude-result-prefixes="xsi xsl client plnk xsd wsdl bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap">       <xsl:template match="/">         <client:parametercollection>           <client:parameters>             <xsl:if test="/client:process/client:name">               <client:namer>                 <xsl:value-of select="/client:process/client:name"/>               </client:namer>             </xsl:if>             <xsl:if test="/client:process/client:place">               <client:place>                 <xsl:value-of select="/client:process/client:place"/>               </client:place>             </xsl:if>             <xsl:if test="/client:process/client:zipcode">               <client:zipcode>                 <xsl:value-of select="/client:process/client:zipcode"/>               </client:zipcode>             </xsl:if>             <xsl:if test="/client:process/client:state">               <client:state>                 <xsl:value-of select="/client:process/client:state"/>               </client:state>             </xsl:if>           </client:parameters>         </client:parametercollection>       </xsl:template>     </xsl:stylesheet>      sample input     <processrequest xmlns="http://xmlns.oracle.com/test/testxslt/bpelprocess1">        <place>place7</place>        <name>name8</name>        <zipcode>zipcode9</zipcode>        <state>state10</state>         <place>place7</place>        <name>name8</name>        <zipcode>zipcode9</zipcode>        <state>state10</state>        <place>place7</place>        <name>name8</name>        <zipcode>zipcode9</zipcode>        <state>state10</state>     </processrequest>     xslt out put      <client:parametercollection xmlns:client="http://xmlns.oracle.com/test/testxslt/bpelprocess1">        <client:parameters>           <client:namer>name8</client:namer>           <client:place>place7</client:place>           <client:zipcode>zipcode9</client:zipcode>           <client:state>state10</client:state>        </client:parameters>     </client:parametercollection> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -