Questions tagged [canonicalization]

is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form.

As per Wikipedia:

In computer science, canonicalization (abbreviated c14n, where 14 represents the number of letters between the C and the N; also sometimes standardization or normalization) is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form. This can be done to compare different representations for equivalence, to count the number of distinct data structures, to improve the efficiency of various algorithms by eliminating repeated calculations, or to make it possible to impose a meaningful sorting order.

197 questions
1
vote
0 answers

XML: how to generate empty namespace prefix and non-empty namespaces prefix using lxml?

I'm using lxml library. I need to generate this tag Invoice with all this namespaces: Notice 1st namespace has no prefix
Omar Gonzales
  • 3,806
  • 10
  • 56
  • 120
1
vote
1 answer

replacing the special character which is showing as encoded

using canonicalize function to convert a value into a actual single quote: ' but when I dump the code, it seems good, in db, it is stored as single quote, when loaded in text box, it becomes that character problem seems to the hash which is…
CDN
  • 95
  • 7
1
vote
1 answer

Python 3 XML Canonicalization

In Python 3, I need to Canonicalize (c14n) an XML string. Which module/package can I use for this? And how should I do this? For reference: http://www.w3.org/TR/xml-exc-c14n/
Miguel Carvalhais Matos
  • 1,113
  • 2
  • 13
  • 21
1
vote
1 answer

Best Practices for multiple OS consistency when using Ruby's Dir.glob

I noticed recently during a debugging session that Dir.glob (aka Dir[]) behaves differently depending on the OS. Specifically the order the files are returned in is different. What are recommended ways to use Dir.glob in Ruby when you know the code…
David West
  • 2,256
  • 6
  • 32
  • 62
1
vote
1 answer

What validations should be done post canonicalize function in ColdFusion to avoid XSS attack?

We are working to avoid XSS attacks in a ColdFusion application. After adding in our cfapplication tag, it worked only for the form input values which are now changed to InvalidTag. However it is not working for URL…
Vishwas S L
  • 169
  • 1
  • 8
1
vote
3 answers

XML Canonicalizer Problem

I'm using the package org.apache.xml.security.c14nfor the canonicalization of XMLs. I use the following code: private String CanonicalizeXML(String XML) throws InvalidCanonicalizerException, CanonicalizationException, ParserConfigurationException,…
Ivan
  • 495
  • 3
  • 9
  • 20
1
vote
0 answers

Canonical forms in Maxima

Background While working in Maxima I got two expressions I knew were equivalent, but Maxima did not think so. (This started out as a question about floating point accuracy in Maxima, but I got stuck on something slightly more fundamental: how to…
pipe
  • 657
  • 10
  • 27
1
vote
1 answer

Serialize to canonical XML with Saxon

Is it possible to configure Saxon's Serializer to produce canonical XML? I found that by default it can produce markup that is not in line with the canonical XML; e.g., self-closing element tags. I checked the available serialization properties, but…
Jindřich Mynarz
  • 1,563
  • 1
  • 16
  • 31
1
vote
2 answers

canonize raw xml data without root element

I have 2 portions of XML data which I have to canonize and create a digest:
MMM 98B230CF5FB220FD75FE916949378C2F
Martin Müller
  • 122
  • 3
  • 17
1
vote
0 answers

301 redirect in apace.conf, non-www to www AND http:// to https://

I am trying to send all traffic to https://www.example.com without using RewriteEngine, because it is a heavy solution. I realize there are solutions out there for my problem involving .htaccess file but I am trying to do this in apache.conf in…
1
vote
3 answers

How to normalize/canonicalize a list of famous names?

I have a text file with a list of famous names compiled from disparate sources that I would like to normalize, so that I can accurately collate them. For example, the list includes variations such as Lao-tse, Lao Tzu, and Lao Zi; but, all of those…
Matt V.
  • 9,703
  • 10
  • 35
  • 56
1
vote
0 answers

How can I generate the right DigestValue for my xml body?

As far as I know, I am supposed to get the DigestValue by taking the canonical form of the XML element that the tag's URI attribute is pointing to, perform a sha1 hash on that, and than base 64 encode it. this is the reference opening…
Chayon
  • 11
  • 2
1
vote
0 answers

Is there a way to canonicalize XML using VBA?

I am using VBA to generate a digital signature for an XML document. Is there a transform class (part of "System.Security.Cryptography.Xml.Transform", I'd guess) that I can tap into through VBA that will perform canonicalization automatically? How…
mjones
  • 41
  • 1
  • 3
1
vote
1 answer

Nokogiri::XML::document canonicalize method returns empty string

I wanted to get a canonicalized version of a piece of xml by using nokogiri, though its canonicalize method is returnin an empty string. d= Nokogiri::XML::Document.new 'e' d.canonicalize #=> "" Does anybody know what am I…
Pedro Rolo
  • 28,273
  • 12
  • 60
  • 94
1
vote
1 answer

XML canonicalization in JAVA 1.5

Does anyone know of any method to canonicalize XML document in java 1.5, without using Canonicalizer class at Apache XML Security project? I can't upgrade java to a newer version and i can't use any external libraries. By saying i can't use any…
Simas.B
  • 724
  • 1
  • 13
  • 31