Sign In/My Account | View Cart  
advertisement

Article:
 Template Languages in XSLT
Subject: Using this approach?
Date: 2005-11-07 12:41:40
From: mseashor

One aspect of this article that was sorely underlooked is a simple sentence as to its actual use (see comments over the last three years). To an experienced XSLT developer, it should be obvious, but if you're new, it might not.


Long story short: YOU NEED TO DEFINE THE PARAMETER "template-uri" to be equal to the templates name!!! Using xalan, it works like this to run template9: java org.apache.xalan.xslt.Process -IN collection.xml -XSL transform9.xslt -PARAM template-uri template9.xml -OUT result9.html


A skim through the article shows that the author considered telling us how to run, saying:
"There's a couple of things to note about this example. First, this transform requires a parameter named template-uri. This URI is used as the input to the document function to retrieve the actual contents of our template."


Unfortunately, though this makes sense to those experienced with XSL. This contains jargon like URI and an offhanded reference to "parameter," which without a knowledge of XSL's parameter tag, doesn't make much sense (why would we need a parameter...is it just passed in by another file?).


Hopefully, in the future, a small section on how the author actually ran the transformations (maybe just in a README file of the example) would be most helpful.



Previous Message Previous Message   Next Message Next Message


Sponsored By: