tcpdump mailing list archives

Re: text format stability


From: Jefferson Ogata <Jefferson.Ogata () noaa gov>
Date: Thu, 01 Jul 2004 04:13:03 -0400

Michael Richardson wrote:
    Guy> for the PDML specification.

I think it is an abuse of XML... nothing is actually marked up.
  Everything seems to be given as attributes, i.e.:

<field name="verhlen" pos="15" show="45" showname="Version and header Length" size="1" value="45">

  rather than:

<field name="verhlen" pos="15" show="45" showname="Version and header Length" size="1">0x45</field>

Using attributes makes it slightly easier to process stuff with XSLT. When you use an <xsl:value-of select='some-text-node'/> you have to be more careful about intercepting all subnodes with another template; otherwise you get all the text nodes in the subtree instead of just the topmost one. When everything is marked up as attributes, you just do <xsl:value-of select='@value'/> and you're done.

--
Jefferson Ogata <Jefferson.Ogata () noaa gov>
NOAA Computer Incident Response Team (N-CIRT) <ncirt () noaa gov>

-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: