Leigh L. Klotz, Jr.

Monday, February 21, 2005

Google Maps for Emacs

I saw a blog dissecting XML in Google Maps and forwarded the pointer off to TV Raman, who implemented Google Maps for Emacs, in particular for EmacsSpeak.

Wednesday, February 02, 2005

XSLT Duplicate Elimination

  <xsl:key name="xyz" match="record[x/y/z]" use="x/y/z" />
  <xsl:variable name="noxyzdups" select="/path/to/record[generate-id(.) = generate-id(key('xyz', x/y/z))]" />
  <xsl:template ... >
    <xsl:copy-of "exslt:node-set($noxyzdups)" />

x/y/z is the xpath expression that you want made unique. It can be concat(x,'-',@y,'-',z) or whatever you want.

How do you write an XSLT transformation that lets you change just one part of a big, unknown document? http://www.xslt.com/html/xsl-list/2000-11/msg01097.html