FW: XML Examples from the presenter

Jason Gurtz jason at tommyk.com
Tue Oct 10 12:57:29 PDT 2000


i didn't have these and they may be of some interest

~Jason


>
>
>
> Well, despite the official meeting location for last night being dark and
> locked, I think we had a pretty good time.  Chris did make me talk about
> XML anyway, but the beer made up for it.  A few notes for those
> who made it:
>
> Sablotron can be found at
>
> http://www.gingerall.com/charlie-bin/get/webGA/act/sablotron.act
>
> (Also see the section on Charlie.)  Of course the authoritative
> source for
> all things XMLish is
>
> http://www.w3.org/
>
> Since I didn't have a hand-out prepared this time, here are the "hello
> world" examples I passed around.  First, the source XML document:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <foo bar="baz">
> </foo>
>
> Second, the XSLT stylesheet:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version='1.0'
> xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
> <xsl:template match="foo">
> 	<bar>
> 	<xsl:value-of select="@bar" />
> 	</bar>
> </xsl:template>
> </xsl:stylesheet>
>
> Of course, if you were using these with a client-side XSLT processor, you
> would reference the stylesheet from the first document.  The
> examples above
> might work with MSIE 5.x, even though its XSL support is based on an
> earlier draft (or, rather, the draft is based on Microsoft's
> implementation); you might have to change the URI for the
> namespace, or use
> 'transform' in place of 'stylesheet' (they are synonyms in the latest
> draft).  I haven't tested it.
>
> If you feed the above into Sablotron you get in return:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <bar>baz</bar>
>
> So, as you can see, the answer to Lauren's question about elements vs.
> attributes is, "do whatever makes you happy and, if necessary,
> convert one
> approach into the other with a stylesheet".  :)
>
> I'd be happy to do a proper presentation sometime in the future
> (January or
> later) if there is interest.  I hope you at least got a taste of
> why XML is
> so exciting from our discussion!
>
> --
>
> Robert Szarka
> CTO/President, Chelsea Data Inc.	+1 800 954 INET
> CTO/Partner, DownCity LLC		+1 860 823 3000
> #include "whois 'handle RS495 at whois.networksolutions.com'"


-- 
Unsubscribe: send email to alfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the alfs-discuss mailing list