2

I am trying to make my own program for canonicalization XML c14n in XSLT. While searching I find examples in Java, C and Python. I am newbie in XSLT and I want to understand if there are any conditions in canonicalization which cannot be made by XSLT?

  • 2
    *canonicalization* - is this even a word? Apparently, yes: https://en.wikipedia.org/wiki/Canonicalization – tom redfern Mar 09 '17 at 09:37
  • If you want to 'canonicalize' an XML file, you'd be better off using some other language than XSLT. Write (or use) an XML parser instead to achieve this goal. – zx485 Mar 10 '17 at 02:51
  • @zx485 thank you for your opinion. I want to use other (more familiar) language but I need reason for it. Is XSLT slower or like dirty hack for this problem? – GreenEkatherine Mar 10 '17 at 07:48
  • I made a little research to compare speed of both cases: with xslt and C languages. For example of xslt I take namespaces normalization from [here](http://lenzconsulting.com/namespace-normalizer/normalize-namespaces.xsl) and xmlsec C library from [here](https://github.com/lsh123/xmlsec). At the same machine on big xml file with size of 14 MB I get 1.49 s for C and 16.3 s for xslt. – GreenEkatherine Mar 13 '17 at 09:56

0 Answers0