SirPaladin Posted September 24, 2006 Share Posted September 24, 2006 My idea is generating an XSLT file using ASP.NET, or PHP.Can I? Does the extension need to be .xslt? Link to comment Share on other sites More sharing options...
boen_robot Posted September 25, 2006 Share Posted September 25, 2006 Yes you can.No, the extension doesn't need to be .xslt. Infact, most XSLTs use .xsl extension but that's not requred either.I know that PHP grabs the raw content of the file (I don't know about ASP), so it's not even necessary to have a file. You can generate the XSLT inside the server script and run the XSLT processor at that point (before the XSLT reaches the client). Link to comment Share on other sites More sharing options...
SirPaladin Posted September 26, 2006 Author Share Posted September 26, 2006 Well, I`d had used ASP .NET because I find it cooler than PHP. >__>Well, perhaps you`d give me a more precise answer if I said my idea.So here`s the point. I want to define some XML tags, so using my tag set, i can query a database (or another XML file) and show the output. So basically, I want to try out my idea for a ColdFusion kinda project, but written in ASP.NET mostly.And for it to work, ideally, I`d have two files. The XML one, which I run, and the .aspx file my XML chooses as stylesheet. Seeing as XML takes the XSL file and uses it on the client, I guess it won`t find the ASP code, but its output, XML XSLT code.So will it work? Link to comment Share on other sites More sharing options...
boen_robot Posted September 27, 2006 Share Posted September 27, 2006 Yes. It will work. As with most of the other similar stuff, the "type" attribute at the processing instruction makes the difference. So<?xml-stylesheet type="text/xsl" href="whatever"?>Will always attempt to read the file in the "href" attribute as an XSLT file and as you said, scince XSLT processing is done on the client in this case, the client actually gets the needed XSLT code instead of the server side script code. Link to comment Share on other sites More sharing options...
SirPaladin Posted September 27, 2006 Author Share Posted September 27, 2006 Thanks. I know it`s done on the client side, the only thing that confused me is the extension. I thought it wouldn`t read the file if it didn`t recognise the extension. But it should work Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now