question about client-side xslt rendering (was Re: [uf-discuss]
Microformats vs XML, redundancy)
brian.suda at gmail.com
Thu Apr 27 10:21:24 PDT 2006
Xiaoming Liu wrote:
> This helps a lot, and I still have remaining issues:
> say I have an xml file "<person><fn>foo</fn><ln>bar</ln></person>"
> In order to use client-side xslt to render this xml file, and make
> sure the result is Microformats-compliant, I wrote an xslt file
> "microformats.xsl", and insert a link to xslt in xml file:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <?xml-stylesheet href="microformat.xsl" type="text/xsl"?>
> This file can be rendered in IE and Firefox, because they do xslt
> client-side rendering, so the display is correct, but when I check
> page source, it's still the raw xml file. And when writing a script to
> fetch Microformats fragments, I have to do XSLT rendering first to get
> HTML back.
> So I am wondering if the above scenario is a good practice, and how
> well it's supported by current Microformats tools.
--- Well, the above scenario isn't really supported because Microformats
are in HTML as class values, not as XML Node names. You have just taken
the Property Names we used in hCard, which we derived from vCard and
made an XML file with corresponding node names. So this really isn't a
microformat at all, and therefore not supported by our tools. The tools
right now are looking for microformats within HTML, not an XML file. Now
you said that you are converting the XML to HTML with microformats.
Since this is done on the client-side, you are at the mercy of each
client. IE and Firefox, as you have noted, are just DISPLAYING the
rendered HTML, but the underlying file is still the XML.
More information about the microformats-discuss