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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Config file to XSLT

Status
Not open for further replies.

w0006941

Programmer
Jan 25, 2004
4
GB

Hi all

I have a xslt that is transforming a flat dataset and into a XML format that is structured.

I have extra data which is not in the dataset and i was going to use a config file to pull the data from and into the final XML.

1. Is this possible and if it is how do i write the config file.

2. What is the line of code that i need to add to the xslt or the final xml to enable this
 
I am not sure I understood exactly what you want to do, but XSLT has a function called document
Code:
[URL unfurl="true"]http://www.zvon.org/xxl/XSLTreference/Output/function_document.html[/URL]
This function will allow you to pull-in/query/use another XML document. Therefore, if you converted your config file to a XML document, you could use this.

Jeni Tennison discusses a XML wrapper (config file)
Code:
[URL unfurl="true"]http://www.jenitennison.com/xslt/utilities/selectParameters.html[/URL]
If you are using a XSLT process like Xalan, you can pass it command-line parameters, so your values in your config file might be able to be passed, e.g.,
Code:
java org.apache.xalan.xslt.Process -in a.xml -xsl a.xsl -out a.html -param font "8" -param height "5" -param width "10"
Miscellaneous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top