found drama

get oblique

xslt saga (cont’d).

by Rob Friesel

finally got the XSL transforms working on my XML docs. Sort of. By “sort of” I mean that the DTD I wrote validates and when I run the XML docs through jEdit’s XSLT Processor plug-in, I get the desired results. Almost. *sigh*

  • The 1st secret turned out to be this: use “xsl:for-each” in about half the places i was prev’ly using “xsl:apply-templates”
  • The 2nd secret: calling “text()” inside of “.” instead of “[insert NODE name here]”
  • The 3rd: lose the span tags. all of them. apply style at the CSS level. and just build those references into the main stylesheet. and reference the main stylesheet fr/ the server’s root. generalize!
  • The 4th: preserve white space at the CSS level.
  • The 5th: be more explicit with white-space when preserving it.
  • The 6th: Containers!
  • The 7th: *sigh* static

Until I figure out how to get the server (or the client for that matter) to properly run the XSLT stylesheet, it will still require running the XSL transform to create the static html doc. At least for now. Sablotron and possible Perl solutions are still being explored. Plus, I might have jumped to conclusions w/r/t/ which browsers can/not process XSL stylesheets on the client side. It might be a simple matter of learning how to properly reference them. We shall see.

In the meantime: Michael Young is a halfway decent teacher but needs a lesson in thoroughness and specificity.

About Rob Friesel

Software engineer by day. Science fiction writer by night. Weekend homebrewer, beer educator at Black Flannel, and Certified Cicerone. Author of The PhantomJS Cookbook and a short story in Please Do Not Remove. View all posts by Rob Friesel →

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*