[Mono-bugs] [Bug 423913] New: Make the XSL generate-id() generate much shorter strings
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Sep 5 18:01:38 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=423913
Summary: Make the XSL generate-id() generate much shorter strings
Product: Mono: Class Libraries
Version: 1.2.6
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: tlillqvist at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The generate-id() function in Mono's implementation of XSL currently generates
very long strings like
Monozipmx003Ammx002Fmmx002Fmlocalhostmx002Fmpptmx002Fmslidesmx002Fmslide3mxmlElementm0m0m7m0m0m1m0m
There is a FIXME comment in mcs/class/System.XML/Mono.Xml.Xsl/XslFunctions.cs
that says: "FIXME: generate short string, not the huge thing it makes now" The
extremely long strings curently generated cause problems if they are used to
form file names, for instance.
I will attach a patch to Mono 1.2.6 that shortens the generated strings
substantially. They should still uniquely identify nodes (nodesets?) as the
current ones do, I hope.
The idea is to output just a sequence of small numbers encoded in base-30 (i.e.
0..9, A..T) with each multi-digit base-30 number prefixed by a separator
character U..Z indicating its length. To get numbers for the BaseURIs and
NodeTypes simple counters kept in hash tables are used, and the node indexes
are used as such.
The generated ids are still not as compact as those generated by .NET, though.
For that probably Golomb coding (http://en.wikipedia.org/wiki/Golomb_coding )
could be used which would compact the number sequences into a bit string which
could then be encoded in base-36.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list