Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XSLT
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Media types== The <code><output></code> element can optionally take the attribute <code>media-type</code>, which allows one to set the [[Internet media type|media type]] (or MIME type) for the resulting output, for example: <code><xsl:output output="xml" media-type="application/xml"/></code>. The XSLT 1.0 recommendation recommends the more general attribute types <code>text/xml</code> and <code>application/xml</code> since for a long time there was no registered media type for XSLT. During this time <code>text/xsl</code> became the de facto standard. In XSLT 1.0 it was not specified how the <code>media-type</code> values should be used. With the release of the XSLT 2.0, the W3C recommended in 2007 the registration of the MIME media type <code>application/xslt+xml</code><ref>{{cite web|title=XSL Transformations (XSLT) Version 2.0|url=http://www.w3.org/TR/2007/REC-xslt20-20070123/#media-type-registration|publisher=W3C|access-date=19 October 2012}}</ref> and it was later registered with the [[Internet Assigned Numbers Authority]].<ref>{{cite web|title=Application Media Types|url=https://www.iana.org/assignments/media-types/application/index.html|publisher=IANA|access-date=19 October 2012}}</ref> Pre-1.0 working drafts of XSLT used <code>text/xsl</code> in their embedding examples, and this type was implemented and continued to be promoted by Microsoft in Internet Explorer<ref>{{cite web|title=XSLT Requirements for Viewing XML in a Browser|url=http://msdn.microsoft.com/en-us/library/windows/desktop/ms757857(v=vs.85).aspx|publisher=Microsoft|access-date=19 October 2012}}</ref> and MSXML circa 2012. It is also widely recognized in the <code>xml-stylesheet</code> processing instruction by other browsers. In practice, therefore, users wanting to control transformation in the browser using this processing instruction were obliged to use this unregistered media type.<ref>{{cite book | last=Kay | first=Michael | title=XSLT 2.0 and XPath 2.0 Programmer's Reference | url=https://archive.org/details/xsltxpathprogram00kaym_646 | url-access=limited | year=2008 | publisher=Wiley | isbn=978-0-470-19274-0 | page=[https://archive.org/details/xsltxpathprogram00kaym_646/page/n151 100]}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)