tpchen wrote:
I have some problem with libxslt. I try to transform the xml file into
another form with the following two files(one is an xml file,
and the other is the xslt file.) I hope to get ?SignatureValue? from the
transform. But I don't know what's wrong. Would anyone be kind
enough to tell me how to solve it. Any suggestion is appreciated. Thanks a
lot....
tpchen
======================== XSL FILE : Test.XSL=================================
http://210.242.21.129/nbca-download/test.xsl
======================== XML FILE : Test.XML=================================
http://210.242.21.129/nbca-download/test.xml
1. The XPath expression
Signature
means elements with *local* name Signature, in no namespace.
Your Signature elements are in the http://www.w3.org/2000/09/xmldsig#
namespace, so you have to specify that. You must use a prefix in order
to do this. Add an xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" to
your xsl:stylesheet and then look for dsig:Signature, not Signature.
2. "//" traverses the entire document looking for nodes.
You know where your dsig:Signature elements are -- they are all
at /IFX/dsig:Signature .. so use that instead of //dsig:Signature in
your xsl:apply-templates.
3. match="//Signature" is also inefficient. Use match="dsig:Signature"
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list