OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Application Design



On Sat, 11 Aug 2001, Sean McGrath wrote:

> XSLT is an example of a 20/80 point technology:-) It
> gets you 80% towards a solution quickly but makes the remaining
> 20% either impossible or so hard that the time it takes to get
> that last 20% done, wipes out the gains you made on the
> first 80%!

Has to be said I've torn my hair out writing an XSLT that takes an input
document describing the configuration of a lot of machines, including the
IP address and netmask, and produce a document showing (amongst many,
many, other things) what networks there were with links to the machines on
each network. To do this, I had to mask the netmask with the IP address
to get the network address and then produce a table for each distinct
network address.

How did I do this?

With two XSLTs. One XPaths out the network config elements and outputs
CSV. Then some Perl munges this and outputs text-XML which is
entity-referenced into the original document (because we can't change the
input document on the fly, it always entity-refs this file, but the build
process starts by putting an empty file there so the first XSLT can work
without a parse error), whereupon the main XSLT finds the lists of which
machines should go in which tables nicely set up for it.


Boy did I wish I was doing that in something like PHP!

>
> Sean
>

ABS

-- 
                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software