I have an xslt and I need to read a file from disk. The file is a simple text file which I would like to read the full content and inline it in my output html/pdf file. Is this possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s how it can be done, using XSLT 2.0’s
unparsed-text()function:For XSLT 1.0, you’d need a workaround involving an XML wrapper file referencing the textfile using an external entity, and the
document()function.