Jump to content

Linking XSL Document to XML documents from the XSL side


adam@jeeni.co.uk

Recommended Posts

Hello all,Got another question for ya’ll. When processing xml with xslt, we have to put a line in the xml linking it to the xsl document: <?xml-stylesheet type="text/xsl" href="./cdcatalog.xsl"?>This seems a bit backwards. Generally we may be getting xml data over-the-wire from 3rd parties and want to format them for our purposes. Equally, other systems getting the same feed may want to transform them differently.Surly we want to say in the xsl which xml it applies to, so we don’t have to edit an xml document. Is there a way to do this?I know we can associate a xsl doc with a xml doc independently in a programming language like Java using xalan or saxon, but can this be done at the text document level?ThanksAdam

Link to comment
Share on other sites

In plain text AND on the client side... JavaScript. This is however only useful when you'll be having HTML output or if you'll be using the output right away. Also, you can't "save" the output and search engines will only index the contents of the HTML executing the JavaScript.You can however also execute transformations on the server with a S3L. How exactly will you do that depends on the S3L in question as well as the actual processor it uses (if more then one). Scince S3Ls can fetch files from remote servers, clients can easily use their own S3L to transform the XML the way they like it and present it to the end user.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...