[xmlsec] Emailing: tmpl-EPM-sign-stylesheet.xml
Edward Shallow
ed.shallow@rogers.com
Sun, 7 Sep 2003 21:38:11 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C37588.59233EF0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
=20
Hi Aleksey,
After numerous attempts to verify the Microsoft InfoPath-created =
dsig
which uses an XSLT transform, I decided to dummy it down and both sign =
and
verify it with XMLSec, to get some clues.
The attached is the only stylesheet transform technique I can get
working with XMLSec. I verified this from the pre-digest transform put =
out
by --store-references. That is good. This working approach completely =
embeds
the entire stylesheet, HTML and all, under the Transform element like =
this
...
=20
<Transform Algorithm=3D"http://www.w3.org/TR/1999/REC-xslt-19991116">
<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
version=3D"1.0">
<xsl:template match=3D"books">
<html><body>
...
My question: Is there any way that XMLSec (libxslt ?) will honour a
stylesheet "reference" whose body resides outside the XML doc being
transformed ?
Simply adding ...
<?xml-stylesheet type=3D"text/xsl" href=3D"books.xsl"?>
... as the 1st line in books.xml doesn't do it. I also tried a href to =
the
stylesheet in several places both in the template and in the doc without
success.
Is this possible ?
Thanks,
Ed
------=_NextPart_000_0000_01C37588.59233EF0
Content-Type: text/xml;
name="tmpl-EPM-sign-stylesheet.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="tmpl-EPM-sign-stylesheet.xml"
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<Envelope xmlns=3D"urn:envelope">
<Signature xmlns=3D"http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod =
Algorithm=3D"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod =
Algorithm=3D"http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI=3D"inout/books.xml">
<Transforms>
<Transform =
Algorithm=3D"http://www.w3.org/TR/1999/REC-xslt-19991116">
<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" =
version=3D"1.0">
<xsl:template match=3D"books">
<html><body>
<h1>A list of books</h1>
<table width=3D"640">
<xsl:apply-templates/>
</table>
</body></html>
</xsl:template>
<xsl:template match=3D"book">
<tr>
<td><xsl:number/></td>
<xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match=3D"author | title | price">
<td><xsl:value-of select=3D"."/></td>
</xsl:template>
</xsl:stylesheet>
</Transform>
</Transforms>
<DigestMethod Algorithm=3D"http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
</SignatureValue>
<KeyInfo>
<X509Data>
<X509SubjectName>
</X509SubjectName>
<X509Certificate>
</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</Envelope>
------=_NextPart_000_0000_01C37588.59233EF0--