Okay, well, for anyone who might have read my earlier thread about 
file-reading problems, that's history.  Turns out that the whole time it 
was a case of not calling xslt_process correctly.  Here's what I've 
discovered, for posterity in the archives...

for me at least, the "simpler" method of calling xslt_process() didn't 
work.  This simpler method uses only three parameters/arguments: the 
xslt processor pointer, the XML file, and the XSL file.  Unfortunately, 
I couldn't use filenames, and maybe this was my problem all along -- I'm 
not sure.  I was trying to use variables representing strings instead of 
filenames, because my XML data was being pulled from MySQL though my XSL 
data was in fact stored in a file.

So I tried the final method shown in the man page for xslt_process(), 
and at first it didn't work, but then when I copied the function 
EXACTLY, it worked.  I'm not sure yet why such a funky means of 
referring to the XML and XSL data is used (a strange array key, to say 
the least -- /_xsl and /_xml ?  anyone know why?).  But for my case, 
that's what needed to be done.

This leaves me with one final question, and it is very very 
XSLT-specific so sorry if it's offtopic... but I just can't think of a 
solution:

I would like to have my XML string (which contains nothing but data 
contained within XML elements) processed by my XSLT file.  I can do 
this.  What I cannot seem to do is specify the output method of the XSLT 
file as "text" (to allow me to output PHP code rather than XML or 
XHTML), and ALSO feature HTML tags in that output -- the HTML tags get 
parsed by the XSLT processor (I assume), and I end up with a 
non-well-formed document.  Short of substituting these tags for 
variables, which is a crude but possibly workable solution, does anyone 
know how I can use HTML tags in my PHP code in my XSLT document?  
(sorry, entities doesn't work either)

TIA and have a good weekend,



Erik





----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to