Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
XSLT
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
XSLT
(section)
Add topic