Is there any way at all to have XSL and XML in the same document? I am trying to avoid having 2 separate files for the XML and XSL. Could someone give me an example of this? I have been searching and experimenting and can't get it to work.
XSL is a language to transform XML to another form of XML. Transforming itself doesnt make any sense, why not just have the structure of XML you are trying to achieve there in the first place?
____________________________________________________________________ Click here to learn Ways to help with Tsunami Relief If you want to get the best response to a question, please read FAQ222-2244 first
It would be possible to place 2 XML data islands in an HTML file... 1 would be the XML data, and the other the XSL data...
Then you could use DOM to preform the transformation...
But, that would completely eliminate the point of using XML in the first place...
the advantage of XML is to use your own tags to describe data... which can then be used to transfer data between databases, or serve as small independent databases, etc...
the advantage of using XSL is to be able to transform multiple XML files with one template...
if you put them both in one document, you might as well just use HTML...
Just out of curiosity...
Is there a specific reason you want to include them into one document?
Visit My Site PROGRAMMER: Red-eyed, mumbling mammal capable of conversing with inanimate objects.
A coworker of mine is actually working on this and he asked me if I knew a there was a way (since I had been waiting for something to do). He wants to send the xml in an email, so referencing another file isn't really feasible.
I understand this isn't typically the way to do things but you'd think there would be a way to do this. I'm guessing he wanted to avoid converting the xml to html everytime and he already had the xsl ready.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.