Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

one xslt and 4 html outputs

Status
Not open for further replies.

mountainbiker

Programmer
Aug 21, 2002
122
GB
scenario:

i am an author writing for lets say 4 magazines. my article appearing in each magazine is essentially the same with the exception of maybe a few paragraphs or a sentences here and there.

my dtd has an elements called <OriginalText> and <RewrittenText magazineName=&quot;...&quot;>.

possible solutions:

i could have 4 xslts or 1 xslt (called 4 times) with a trigger (like <xslt:choose>) to transform the xml instance into 4 (slightly) different html transformations.

question:

i was wondering if any of you have a similar scenerio in your efforts, and how did you handled it?




 
I am using the -param command-line option of xalan, e.g.,
Code:
java org.apache.xalan.xslt.Process -in a.xml -xsl a.xsl -out a1.html -param version STYLE1
java org.apache.xalan.xslt.Process -in a.xml -xsl a.xsl -out a2.html -param version STYLE2
java org.apache.xalan.xslt.Process -in a.xml -xsl a.xsl -out a3.html -param version STYLE3
java org.apache.xalan.xslt.Process -in a.xml -xsl a.xsl -out a4.html -param version STYLE4

Then in the XSLT use the $version to do conditional statements to control imports and rendenations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top