Tuesday, September 16, 2008

Dorkbot SoCal Sept. 27

Dorkbot SoCal 31 - "Nerd Droid", univac, Mack


Saturday, September 27, 2008
1:00pm
Machine Project
1200 D North Alvarado Street
Los Angeles, CA 90026
free!

Dorkbot SoCal is the LA chapter of the global technological arts ogranization whose motto is "people doing strange things with electricity!"

Presenters:

"Nerd Droid" (Jerrold Ridenour & Anthony Magnetta)
http://myspace.com/nerddroid

Instrument bending and video glitching VJ duo

Tom Koch (univac)
http://techdweeb.com

Musical Gadgets

Kevin Mack
http://www.kevinmackart.com/


Mathematical Abstract 3D Art

More info at:
http://dorkbot.org/dorkbotsocal



Thursday, September 04, 2008

XLST and Namespace Pain

OK, imagine you have this XML:

<?xml version = "1.0" encoding = "ISO-8859-1"?>
<alert xmlns = "urn:oasis:names:tc:emergency:cap:1.1">
  <info>
   <category>Met</category>
  </info>
<alert>

How do you refer to the "category" tag in XPath for XSLT, as it is in the "urn:oasis:names..." namespace?

  1. Ignore the namespace, and do something like:  

    <xsl:apply-templates select ="//*[local-name()='category']" />

  2. Define the namespace in the stylesheet tag and use the full path:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cap = "urn:oasis:names:tc:emergency:cap:1.1">
    ...
    <xsl:apply-templates select ="cap:alert/cap:info/cap:category" />


  3. Or define the namespace and use a simplified path:

    <xsl:apply-templates select ="//cap:category" />


It took me a long time to work this out....