[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: is there a way to hash an element?

Subject: Re: is there a way to hash an element?
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Jun 2016 14:27:22 -0000
Re:  is there a way to hash an element?
I would also try to use the standard XPath 2.0 function:

    deep-equal()

Yes, it doesn't generate an id for identifying a sub-tree, but still
can be used for establishing classes of equivalence.

Just a quick thought.

Cheers,
Dimitre

On Thu, Jun 9, 2016 at 3:51 PM, Dimitre Novatchev dnovatchev@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> You may even not need a hash function.
>
> Just use the standard XPath 3.0 function:
>
>   serialize()
>
>
> http://www.w3.org/TR/xpath-functions-30/#func-serialize
>
>
> Cheers,
> Dimitre
>
> On Thu, Jun 9, 2016 at 3:08 PM, Graydon graydon@xxxxxxxxx
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> Hello all --
>>
>> So I've got about half a gibabyte of XML messages describing various
>> health care actions.  Many of these are structural duplicates of each
>> other; the top elements differ by their attribute values, but the
>> structure and values of the descendant elements is the same.  The amount
>> of duplication varies from none to thousands.
>>
>> I've got an apparently useful heuristic based on descendant attribute
>> values, but would -- it is health care data -- really like to have a
>> more robust way to group the elements into set of equivalent top-level
>> names by their structural sameness.  (I can't hand-check the whole data
>> set.)
>>
>> So I find myself wanting an equivalent of sha256sum for elements so I
>> could generate a grouping key from the descendant elements and their
>> associated attributes as a unit.
>>
>> Is there such a thing?  Equivalent approaches?
>>
>> Thanks!
>> Graydon
>>
>
>
>
> --
> Cheers,
> Dimitre Novatchev
> ---------------------------------------
> Truly great madness cannot be achieved without significant intelligence.
> ---------------------------------------
> To invent, you need a good imagination and a pile of junk
> -------------------------------------
> Never fight an inanimate object
> -------------------------------------
> To avoid situations in which you might make mistakes may be the
> biggest mistake of all
> ------------------------------------
> Quality means doing it right when no one is looking.
> -------------------------------------
> You've achieved success in your field when you don't know whether what
> you're doing is work or play
> -------------------------------------
> To achieve the impossible dream, try going to sleep.
> -------------------------------------
> Facts do not cease to exist because they are ignored.
> -------------------------------------
> Typing monkeys will write all Shakespeare's works in 200yrs.Will they
> write all patents, too? :)
> -------------------------------------
> Sanity is madness put to good use.
> -------------------------------------
> I finally figured out the only reason to be alive is to enjoy it.
> 



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.