|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello all!
I've used some XML in webpages before, and haven't had any trouble until recently. I am starting to try to learn some XSL as well, and I understand how it can transform into X/HTML. The trouble I am getting is when instead of transforming the XML into HTML, I just try to modify the XML into a new XML file. First, I don't see any changes ever occuring, when I open up the XML file (which is linked to the XSL file, similar to how an HTML file is linked to an external CSS file). I assume that when I open up this XML file, it processes the link to the XSL file, and then transforms the output to the browser. However, when I open up this XML file and "View Source" (I am using IE 6), the source of the XML does not change! I'm not sure if the XSL transformations just aren't working, or perhaps I can just not see the transformed XML file this way. If the latter is the case, how CAN you see the transformed XML output? Second, when you use XSL to transform an XML file to HTML, it is possible to just save the resulting HTML file (by opening it in a browser, and using the browser to save it as an HTML file). I know you can take an XML file and transform it into most anything - say, a PDF file if you wanted to. How can you actually "save" the transformed data into a new file when not dealing strictly with HTML? I would like to save the output of my XML transformation as a new XML file. Is this possible? I've looked around for answers to these questions, but haven't been able to find anything very helpful as of yet =/ I also haven't seen any information about this in any of the XSL tutorials I have read, they ALWAYS focus solely on doing simple transformations from XML to HTML, and don't seem to want to touch anything else. Perhaps I'm just missing something very simple here? Thank you very much for any insight you may have! |
|
#2
|
||||
|
||||
|
To answer the first question, the source is the XML. Second question, what I have done is used php to do my transformations to save a static html page.
Basically you will need a 'program' to transform the xml/xsl for you, not ie, if you are looking to create a static page. Third question, I think, yes you can use xsl to create xml, remeber that xhtml, IS xml. PHP Code:
-Teflon
__________________
Teflon - The Black <desc>Mark This Up</desc> |
|
#3
|
|||
|
|||
|
.
Teflon,
Thank you very much for your response! It definately answered my questions. I have done a little bit of work with PHP before, so I will try to make it work following the starting block you have provided. At least now I should be able to *see* the transformed document, as well! = ) One would think there would be a simpler way to view the transformed data... maybe in a perfect world ![]() Thanks again! |
|
#4
|
|||
|
|||
|
.
I've thought of another question! = )
Well, as I understand it, to use this method (of using PHP as the program to do the transformations) you need access to the configuration settings and such of a web server. Well, I happen to have access to a webserver that runs PHP, but I don't have any kind of access to get the Sablotron extensions to PHP added to / running on the server. Is there any way to use another "program" to do this for me? Although PHP would be nice (especially since I've already worked with it a bit), it would be ideal (at least for me) if it was standalone and didn't require any kind of server, or even internet access, so I could do it from a laptop in the middle of a deserted island if I had to Is this possible? I would think it would have to be... although I'm not sure why. =/Thanks again! |
|
#5
|
||||
|
||||
|
http://www.xm.co.nz/XML/XSL/msxml3.html
http://xml.apache.org/xalan-c/index.html Maybe this will help you? btw. That snippet does not use sablotron, it is php 5 which changed the xsl processor. Usually all you need to get it to run is uncomment a single line in php.ini. I thought I saw a javascript solution somewhere that didnt use m$xml. I'll look around some more. -Teflon |
|
#6
|
|||
|
|||
|
.
Aha!
These are excellent suggestions! I thank you for spending the time to help answer my questions. Just when you think you know something, you find out you are out of date = ) I have spoken with the administrators of the web server I use, and hopefully then will be adding support for XML translations sometime before next year! But for now, I will look into the "stand alone processor" and Xalan-C++. It sounds like they may be just the thing/s I've been looking for! Thank you, Master Teflon ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Two Questions About XSL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|