Subject: Re: [xsl] C14N and XSLT From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 10 Apr 2018 17:56:51 -0000 |
I decided it was worth looking at whether C14N can be offered as an XSLT serialization option (saxon:canonical="yes") and it seems easy enough. The main changes needed to the existing XML serializer seem to be: (a) <empty></empty> for empty elements (b) sorting of namespaces alphabetically (by prefix, though the spec seems unclear) (c) sorting of attributes by name - equivalent to the existing Saxon 9.8 option saxon:attribute-order="". (d) inserting newlines before/after top-level comments and processing instructions. Are there any other implications anyone knows of? Michael Kay Saxonica > On 10 Apr 2018, at 14:12, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > All, > > I am evaluating whether I should make C14N part of an XSLT chain or have something like XMLStarlet at the end of the process. > > I believe that by the book, I can not guarantee an XML serialisation from an XSLT renders a canonical XML, can I? > To me things like <foo></foo> instead of <foo/> are impossible to force, or did I missed something? > (I am aware of some undocumented tricks that help me force this in some processors, but that is no guarantee for a long lasting solution) > > I am leaning towards using a C14N dedicated tooling, but the files are big and XSLT streaming would help > > Any thoughts? > > Thanks, > > Geert > XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <-list/293509> (by email <>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] C14N and XSLT, Michael Kay mike@xxx | Thread | Re: [xsl] C14N and XSLT, Peter Flynn peter@xx |
Re: [xsl] XSLT function for title c, David Sewell dsewell | Date | Re: [xsl] C14N and XSLT, Peter Flynn peter@xx |
Month |