hello,
i want to make that type of xsl file which remove the namespace value as well as adding parameter value in xml file. here is my latest xsl file, which removed the namespace but didn't add param value into "t0019/ifta_account" template. so when data transfer from xml to database at that time file name not set into (xml_ifta_account) table. we are try transferring xml data into table using java xsu api.
EDIT(Jim Garrison): Reformatted, removed ordered list due to bug in Markdown Engine http://meta.stackoverflow.com/questions/19624/bug-in-markdown-formatter/19799#19799
END-OF-EDIT
(note: xsl file param value set from outside when xsl file is call. using this xsl file we adding data from xml to database.)
xml file : (name of xml file: user_if_account.xml)
<T0019 XMLNS:XSI="HTTP://WWW.W3.ORG/2001/XMLSCHEMA-INSTANCE" XSI:SCHEMALOCATION="HTTP://WWW.SAFERSYS.ORG/NAMESPACES/T0019V1 T0019V1.XSD" XMLNS="HTTP://WWW.SAFERSYS.ORG/NAMESPACES/T0019V1">
<XSL:PARAM NAME="FILE_NAME" SELECT="T0019/IFTA_ACCOUNT/FILE_NAME" />
<IFTA_ACCOUNT>
<IFTA_CARRIER_ID_NUMBER>705</IFTA_CARRIER_ID_NUMBER>
<IFTA_BASE_COUNTRY>US</IFTA_BASE_COUNTRY>
</IFTA_ACCOUNT>
<IFTA_ACCOUNT>
<IFTA_CARRIER_ID_NUMBER>706</IFTA_CARRIER_ID_NUMBER>
<IFTA_BASE_COUNTRY>US</IFTA_BASE_COUNTRY>
</IFTA_ACCOUNT>
</T0019>
table structure:(xml_ifta_account)
FILE_NAME VARCHAR2(120)
IFTA_CARRIER_ID_NUMBER VARCHAR2(12)
BASE-COUNTY VARCHAR2(2)
XSL file
<XSL:TEMPLATE MATCH="/">
<XSL:ELEMENT NAME="T0019">
<XSL:APPLY-TEMPLATES SELECT="* | T0019/IFTA_ACCOUNT">
</XSL:APPLY-TEMPLATES>
</XSL:ELEMENT>
</XSL:TEMPLATE>
<XSL:TEMPLATE MATCH="*">
<XSL:ELEMENT NAME="{LOCAL-NAME()}">
<XSL:APPLY-TEMPLATES SELECT="@* | NODE()"/>
</XSL:ELEMENT>
</XSL:TEMPLATE>
<XSL:TEMPLATE MATCH="@* | TEXT() | COMMENT() | PROCESSING-INSTRUCTION()">
<XSL:COPY/>
</XSL:TEMPLATE>
<XSL:TEMPLATE MATCH="T0019/IFTA_ACCOUNT">
<XSL:ELEMENT NAME="IFTA_ACCOUNT">
<XSL:ELEMENT NAME="FILE_NAME">
<XSL:VALUE-OF SELECT="$FILE_NAME"/>
</XSL:ELEMENT>
<XSL:ELEMENT NAME="IFTA_CARRIER_ID_NUMBER">
<XSL:VALUE-OF SELECT="IFTA_CARRIER_ID_NUMBER"/>
</XSL:ELEMENT>
<XSL:ELEMENT NAME="IFTA_CARRIER_ID_NUMBER">
<XSL:VALUE-OF SELECT="IFTA_CARRIER_ID_NUMBER"/>
</XSL:ELEMENT>
</XSL:ELEMENT>
</XSL:TEMPLATE>
Wanted output : XML_IFTA_ACCOUNT
FILE_NAME IFTA_CARRIER_ID_NUMBER BASE-COUNTY
USER_IF_ACCOUNT 705 US
USER_IF_ACCOUNT 706 US
please please please help me. if any other confusion then let me know.