[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[xml] How to using XSLT get SignatureValue on XML Signature??
- From: "tpchen" <tpchen ecomuniversal com tw>
- To: <xml gnome org>
- Subject: [xml] How to using XSLT get SignatureValue on XML Signature??
- Date: Mon, 26 Aug 2002 16:19:53 +0800
I am converting XML to HTML using a XSLT stylesheet.
I wish using XSLT to get SignatureValue on XML Signature and display it
on browser.
But I am failure. I don¡¦t know what is happened it.
[Input file 07.XML]
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="o7.xsl"?>
<!--Sample XML file generated by XML Spy v4.0 U
(http://www.xmlspy.com)-->
<IFX xmlns="http://www.ifxforum.org" xmlns:tw.org.ba="http://www.ba.org.
tw" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ifxforum.org
D:\2001BAROC\Vendor\final\schema\intraBank\IFX110-TW11-URI.xsd">
<SignonRq Id="signonrq001">
<!-- This is the first message -->
<SignonPswd>
<SignonRole>Customer</SignonRole>
<CustId>
<SPName>004</SPName>
<CustPermId>11027686</CustPermId>
<CustLoginId>GreatCompany</CustLoginId>
</CustId>
<CustPswd>
<CryptType>None</CryptType>
<Pswd>1234</Pswd>
</CustPswd>
<GenSessKey>1</GenSessKey>
</SignonPswd>
<ClientDt>2001-03-07T11:27:05</ClientDt>
<CustLangPref>zh-TW</CustLangPref>
<ClientApp>
<Org>tw.com.bot</Org>
<Name>Internet Banking</Name>
<Version>1.0</Version>
</ClientApp>
<SuppressEcho>1</SuppressEcho>
</SignonRq>
<PaySvcRq Id="paysvcrq001">
<RqUID>03931706-0863-4A47-80DA-CED3C6901ED1</RqUID>
<PmtAddRq>
<tw.org.ba:MsgId>100100</tw.org.ba:MsgId>
<RqUID>f81d4fae-7dec-11d0-a765-00a0c91e6bf6</RqUID>
<CustId>
<SPName>TWN</SPName>
<CustPermId>11027686</CustPermId>
</CustId>
<PmtInfo>
<LegalName>FINANCIAL INFORMATION SERVICE
CO.,LTD.</LegalName>
<RemitInfo>
<RemitInstruction>
<DeliveryMethod>Email</DeliveryMethod>
<ContactInfo>
<EmailAddr>1234 mail ba org tw</EmailAddr>
</ContactInfo>
</RemitInstruction>
<CustPayeeInfo>
<Name>ABC
CO.,LTD.</Name>
<XferPayee>
<DepAcctIdTo>
<AcctId>041001078632</AcctId>
<AcctType>SDA</AcctType>
<BankInfo>
<BankId>005</BankId>
<BranchId>0418</BranchId>
</BankInfo>
</DepAcctIdTo>
</XferPayee>
<tw.org.ba:CustPayeeId>24681357</tw.org.ba:CustPayeeId>
</CustPayeeInfo>
<CurAmt>
<Amt>100000</Amt>
</CurAmt>
<RemitDetail>
<BillRefInfo>S1234567</BillRefInfo>
<Memo>Internet
Shopping</Memo>
<InvoiceInfo>
<InvoiceNum>FF23427233</InvoiceNum>
<TotalCurAmt>
<Amt>250000</Amt>
</TotalCurAmt>
<EffDt>2001-03-05</EffDt>
</InvoiceInfo>
</RemitDetail>
</RemitInfo>
<DepAcctIdFrom>
<AcctId>003001215686</AcctId>
<AcctType>SDA</AcctType>
<BankInfo>
<BankId>004</BankId>
<BranchId>0037</BranchId>
</BankInfo>
</DepAcctIdFrom>
<PrcDt>2001-03-07</PrcDt>
<ImmediatePmt>1</ImmediatePmt>
<PmtRefId>RF143025623</PmtRefId>
</PmtInfo>
</PmtAddRq>
</PaySvcRq>
<SignoffRq>
<CustId>
<SPName>004</SPName>
<CustPermId>11027686</CustPermId>
<CustLoginId>GreatCompany</CustLoginId>
</CustId>
</SignoffRq>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
/>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#signonrq001">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>73XuVA3TkE2Eok0brC/aIqEsNfw=</DigestValue>
</Reference>
<Reference URI="#paysvcrq001">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>dedCgu4npPvzU9dpu6tZILDoEDs=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>c2BI+UnYNtauimVPUt9NLRQZ+PWxcWMzfeAYkuzInF/wsP+8pGFxo3Xs
e4fedWThkhQLDkY9QHT4TAs1h+9QTRxoZh7sGU/Zq/KfuW1wvTv+jlAN+WB9La/aAnR+7KKh
JVre7vvyX4P9Duidy/OkI8fDk3Twipq82/v5T5eJHJY=</SignatureValue>
<KeyInfo>
<KeyValue>
<RSAKeyValue>
<Modulus>oECqB1/Wq8KkhWhcRRbzXXRghLIiAjgsJUGITiMhZLZbIvHxVY5Uj0j40J4uH1U
iH3zc4GhbpMTr6/W24JRu96Qlo7GLc00AkMofeduQGkl+k/amiNvPfULluZU4iVVuGq2fsU5
MhHCOzDH7Cuc6h5OoD4ApW2WWQLDdAJ3S0+c=</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
/>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#signonrq001">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
/>
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>73XuVA3TkE2Eok0brC/aIqEsNfw=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>lKgPxnId82YDH4q9uuBM6DiMniRm6RgVH5MxF08kY/kHBrSygKq3NWEp
tDwx3Mz/z8K+JA6MAZsG7Yt79QVt0oqpqqEArJWZR325KvpDYOdP+GLgVrSVW28hN0Z3vetj
APZaykJuKB1AkW3cJXJe7Qse3Ehm7qLyojoItZBX2aY=</SignatureValue>
<KeyInfo>
<KeyValue>
<RSAKeyValue>
<Modulus>oECqB1/Wq8KkhWhcRRbzXXRghLIiAjgsJUGITiMhZLZbIvHxVY5Uj0j40J4uH1U
iH3zc4GhbpMTr6/W24JRu96Qlo7GLc00AkMofeduQGkl+k/amiNvPfULluZU4iVVuGq2fsU5
MhHCOzDH7Cuc6h5OoD4ApW2WWQLDdAJ3S0+c=</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</IFX>
//======================================================================
=====================
[Input file o7.xsl]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<HTML>
<TITLE>XML Using XSL</TITLE>
<BODY>
<H1>XSL show SignatureValue</H1>
<TABLE BORDER="1">
<TR><TD>TagName</TD><TD>Value</TD><TD>NameSpace</TD> </TR>
<xsl:apply-templates select="//Signature"/>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="//Signature">
<TR STYLE="font-weight:bold; font-size:12">
<TD><xsl:value-of select = "local-name()" />:</TD>
<TD STYLE="font-style:italic; font-size:12">
<xsl:value-of select="SignatureValue"/>
</TD>
<TD STYLE="font-style:italic; font-size:12">
<xsl:value-of select="namespace-uri()" />
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<HTML>
<TITLE>XML Using XSL</TITLE>
<BODY>
<H1>XSL show SignatureValue</H1>
<TABLE BORDER="1">
<TR><TD>TagName</TD><TD>Value</TD><TD>NameSpace</TD> </TR>
<xsl:apply-templates select="//Signature"/>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="//Signature">
<TR STYLE="font-weight:bold; font-size:12">
<TD><xsl:value-of select = "local-name()" />:</TD>
<TD STYLE="font-style:italic; font-size:12">
<xsl:value-of select="SignatureValue"/>
</TD>
<TD STYLE="font-style:italic; font-size:12">
<xsl:value-of select="namespace-uri()" />
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="o7.xsl"?>
<!--Sample XML file generated by XML Spy v4.0 U (http://www.xmlspy.com)-->
<IFX xmlns="http://www.ifxforum.org" xmlns:tw.org.ba="http://www.ba.org.tw" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ifxforum.org D:\2001BAROC\Vendor\final\schema\intraBank\IFX110-TW11-URI.xsd">
<SignonRq Id="signonrq001">
<!-- This is the first message -->
<SignonPswd>
<SignonRole>Customer</SignonRole>
<CustId>
<SPName>004</SPName>
<CustPermId>11027686</CustPermId>
<CustLoginId>GreatCompany</CustLoginId>
</CustId>
<CustPswd>
<CryptType>None</CryptType>
<Pswd>1234</Pswd>
</CustPswd>
<GenSessKey>1</GenSessKey>
</SignonPswd>
<ClientDt>2001-03-07T11:27:05</ClientDt>
<CustLangPref>zh-TW</CustLangPref>
<ClientApp>
<Org>tw.com.bot</Org>
<Name>Internet Banking</Name>
<Version>1.0</Version>
</ClientApp>
<SuppressEcho>1</SuppressEcho>
</SignonRq>
<PaySvcRq Id="paysvcrq001">
<RqUID>03931706-0863-4A47-80DA-CED3C6901ED1</RqUID>
<PmtAddRq>
<tw.org.ba:MsgId>100100</tw.org.ba:MsgId>
<RqUID>f81d4fae-7dec-11d0-a765-00a0c91e6bf6</RqUID>
<CustId>
<SPName>TWN</SPName>
<CustPermId>11027686</CustPermId>
</CustId>
<PmtInfo>
<LegalName>FINANCIAL INFORMATION SERVICE CO.,LTD.</LegalName>
<RemitInfo>
<RemitInstruction>
<DeliveryMethod>Email</DeliveryMethod>
<ContactInfo>
<EmailAddr>1234 mail ba org tw</EmailAddr>
</ContactInfo>
</RemitInstruction>
<CustPayeeInfo>
<Name>ABC CO.,LTD.</Name>
<XferPayee>
<DepAcctIdTo>
<AcctId>041001078632</AcctId>
<AcctType>SDA</AcctType>
<BankInfo>
<BankId>005</BankId>
<BranchId>0418</BranchId>
</BankInfo>
</DepAcctIdTo>
</XferPayee>
<tw.org.ba:CustPayeeId>24681357</tw.org.ba:CustPayeeId>
</CustPayeeInfo>
<CurAmt>
<Amt>100000</Amt>
</CurAmt>
<RemitDetail>
<BillRefInfo>S1234567</BillRefInfo>
<Memo>Internet Shopping</Memo>
<InvoiceInfo>
<InvoiceNum>FF23427233</InvoiceNum>
<TotalCurAmt>
<Amt>250000</Amt>
</TotalCurAmt>
<EffDt>2001-03-05</EffDt>
</InvoiceInfo>
</RemitDetail>
</RemitInfo>
<DepAcctIdFrom>
<AcctId>003001215686</AcctId>
<AcctType>SDA</AcctType>
<BankInfo>
<BankId>004</BankId>
<BranchId>0037</BranchId>
</BankInfo>
</DepAcctIdFrom>
<PrcDt>2001-03-07</PrcDt>
<ImmediatePmt>1</ImmediatePmt>
<PmtRefId>RF143025623</PmtRefId>
</PmtInfo>
</PmtAddRq>
</PaySvcRq>
<SignoffRq>
<CustId>
<SPName>004</SPName>
<CustPermId>11027686</CustPermId>
<CustLoginId>GreatCompany</CustLoginId>
</CustId>
</SignoffRq>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#signonrq001">
<Transforms>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>73XuVA3TkE2Eok0brC/aIqEsNfw=</DigestValue>
</Reference>
<Reference URI="#paysvcrq001">
<Transforms>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>dedCgu4npPvzU9dpu6tZILDoEDs=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>c2BI+UnYNtauimVPUt9NLRQZ+PWxcWMzfeAYkuzInF/wsP+8pGFxo3Xse4fedWThkhQLDkY9QHT4TAs1h+9QTRxoZh7sGU/Zq/KfuW1wvTv+jlAN+WB9La/aAnR+7KKhJVre7vvyX4P9Duidy/OkI8fDk3Twipq82/v5T5eJHJY=</SignatureValue>
<KeyInfo>
<KeyValue>
<RSAKeyValue>
<Modulus>oECqB1/Wq8KkhWhcRRbzXXRghLIiAjgsJUGITiMhZLZbIvHxVY5Uj0j40J4uH1UiH3zc4GhbpMTr6/W24JRu96Qlo7GLc00AkMofeduQGkl+k/amiNvPfULluZU4iVVuGq2fsU5MhHCOzDH7Cuc6h5OoD4ApW2WWQLDdAJ3S0+c=</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#signonrq001">
<Transforms>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>73XuVA3TkE2Eok0brC/aIqEsNfw=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>lKgPxnId82YDH4q9uuBM6DiMniRm6RgVH5MxF08kY/kHBrSygKq3NWEptDwx3Mz/z8K+JA6MAZsG7Yt79QVt0oqpqqEArJWZR325KvpDYOdP+GLgVrSVW28hN0Z3vetjAPZaykJuKB1AkW3cJXJe7Qse3Ehm7qLyojoItZBX2aY=</SignatureValue>
<KeyInfo>
<KeyValue>
<RSAKeyValue>
<Modulus>oECqB1/Wq8KkhWhcRRbzXXRghLIiAjgsJUGITiMhZLZbIvHxVY5Uj0j40J4uH1UiH3zc4GhbpMTr6/W24JRu96Qlo7GLc00AkMofeduQGkl+k/amiNvPfULluZU4iVVuGq2fsU5MhHCOzDH7Cuc6h5OoD4ApW2WWQLDdAJ3S0+c=</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</IFX>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]