Jump to content

xml+xslt => new xml


Guest bvr

Recommended Posts

Hi,I want to transform one xml file to another xml file using xslt. I have both xml file(cdcatlog.xml) and xsl file(cdcatlog.xsl). I want to get xml output in cdupdcatlog.xml. Any suggestion will be appreciate.Thanks and Regardsbvr

Link to comment
Share on other sites

Outputs in XSLT are generated on-the-fly when you preview the XML file. They are not creating another file, but are "styling" the XML to look like another XML. That's infact the reason they are called stylesheets despite their great content control capabilities. The only way you might be able to get the output in a new file would be to execute the transformation with a server side scripting language and use this same language to tell the output to be saved as the new file and show the user something else (redirect to the new file perhaps?).

Link to comment
Share on other sites

  • 2 weeks later...

Exactly what are you trying to do with them? Are you trying to get both xml files in one?

Link to comment
Share on other sites

Exactly what are you trying to do with them? Are you trying to get both xml files in one?

No, by using xslt, i tried convert to one xml document format to another format.Just like, in Pre-press activity they composing(allign) the text by means of pagination softwares.I want the same by means of xslt.can you get me now.cheers,kamal.
Link to comment
Share on other sites

No, by using xslt, i tried convert to one xml document format to another format.Just like, in Pre-press activity they composing(allign) the text by means of pagination softwares.I want the same by means of xslt.can you get me now.cheers,kamal.

Like kvnmck18, I can't get your point either. XSLT is exactly the language to convert one XML into another XML based language. On W3Schools you can see XML-to-XHTML examples, but if you just rename <html> to (for example) <mytag>, <table> to <anothertag> and so on, you'll get an XML-to-XML transformation. Everything in XSLT which doesn't use the XSLT namespace (<xsl:*>) is part of the output, and what's the output depends totally on you.
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...