|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there a way to access the name of the XML file utilizing the XSL file from XSL?
Basically I need to know the name of the XML file calling the XSL file from within the XSL file.
Is this possible? Cul |
|
#2
|
|||
|
|||
|
Well, depending on how you call the xsl file you may be able to pass the name in as a <xsl:param>. Do you have control of how the parser is activated?
Last edited by bricker42 : January 9th, 2004 at 11:31 PM. |
|
#3
|
|||
|
|||
|
Yes, I do. The XSL transformation to HTML is done server side via a PHP script with Sablotron. At the point of the script I have the file name, I just dont know how I can give it to the XSL file as a param as you suggested.
What I have done in the interm was add a <filename> element to the XML file itself. I would rather not do this, but it works! Cul |
|
#4
|
|||
|
|||
|
Check this out.
http://us4.php.net/manual/en/function.xslt-create.php There's a perfect example of what you're wanting to do at the bottom. |
|
#5
|
|||
|
|||
|
Excellent thanks, totally missed the parameters set as part of xslt_process().
Cul |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Is there a way to access the name of the XML file utilizing the XSL file from XSL? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|