Extensible Stylesheet Language Transformations: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
HsfBot (bicara | kontrib)
k Bot: Perubahan kosmetika
InternetArchiveBot (bicara | kontrib)
Rescuing 5 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(7 revisi perantara oleh 5 pengguna tidak ditampilkan)
Baris 3:
| name = XSL Transformations
| extension = .xsl<span style="font-family: sans-serif;">,</span> .xslt
| mime = application/xslt+xml<ref>[{{Cite web |url=http://www.w3.org/TR/xslt20/#xslt-mime-definition |title=XSL Transformations (XSLT) Version 2.0<!-- Bot generated title -->] |access-date=2008-06-12 |archive-date=2006-06-13 |archive-url=https://web.archive.org/web/20060613010826/http://www.w3.org/TR/xslt20/#xslt-mime-definition |dead-url=no }}</ref>
| owner = [http://www.w3.org/ World Wide Web Consortium]
| screenshot = [[Berkas:XSLT.svg|200px]]
Baris 16:
}}
[[Berkas:XSLT en.svg|ka|jmpl|Diagram of the basic elements and process flow of Extensible Stylesheet Language Transformations]]
'''Extensible Stylesheet Language Transformations''', disingkat '''XSLT''', adalah bahasa pemrograman berdasar [[XML]] yang digunakan untuk [[XML transformation language|transformasi dokumen XML]] menjadi dokumen XML atau format lainnya. Transformasi tidak mengubah dokumen asli, melainkan menghasilkan dokumen baru berdasarkan isi dokumen asli.<ref name="result_doctype">[{{Cite web |url=http://www.w3.org/TR/xslt#section-Introduction |title=XSL Transformations (XSLT)] |access-date=2008-06-12 |archive-date=2017-08-13 |archive-url=https://web.archive.org/web/20170813015028/http://www.w3.org/TR/xslt#section-Introduction |dead-url=no }}</ref> XSLT sering digunakan untuk mengkonversi data dari satu [[XML schema]] ke schema lain, ke format [[XHTML]], atau format XML yang dapat diubah menjadi dokumen [[Portable Document Format|PDF]].
 
Sebagai bahasa pemrograman, XSLT dipengaruhi oleh [[functional programming|bahasa pemrograman fungsional]].<ref>{{cite web | url=http://www.idealliance.org/papers/extreme/proceedings/html/2006/Novatchev01/EML2006Novatchev01.html | author=Dimitre Novatchev | title=Higher-Order Functional Programming with XSLT 2.0 and FXSL | accessdaymonth=January 18 | accessyear=2007 | work=ExtremeMarkupLanguages | access-date=2008-06-12 | archive-date=2008-07-05 | archive-url=https://web.archive.org/web/20080705160650/http://www.idealliance.org/papers/extreme/Proceedings/html/2006/Novatchev01/EML2006Novatchev01.html | dead-url=yes }}</ref> Pendahulunya adalah [[DSSSL]], bahasa pemrograman yang mentransformasi [[SGML]] seperti XSLT mentransformasi XML. XSLT juga dapat dianggap sebagai sebuah [[template processor]]. XSLT adalah [[Turing complete]].<ref>Kepser, Stephan. (2004).</ref><ref>[http://www.mulberrytech.com/Extreme/Proceedings/html/2004/Kepser01/EML2004Kepser01.html A Simple Proof for the Turing-Completeness of XSLT and XQuery] {{Webarchive|url=https://web.archive.org/web/20070927211240/http://www.mulberrytech.com/Extreme/Proceedings/html/2004/Kepser01/EML2004Kepser01.html |date=2007-09-27 }}''. International Digital Enterprise Alliance.</ref><ref>[{{Cite web |url=http://www.unidex.com/turing/utm.htm |title=Universal Turing Machine in XSLT] |access-date=2008-06-12 |archive-date=2019-01-09 |archive-url=https://web.archive.org/web/20190109020124/http://www.unidex.com/turing/utm.htm |dead-url=no }}</ref>
 
== Sejarah ==
Baris 34:
 
== Contoh XSLT ==
Contoh dokumen XML sumber<sourcesyntaxhighlight lang="xml">
<?xml version="1.0" ?>
<persons>
Baris 46:
</person>
</persons>
</syntaxhighlight>
</source>
 
=== Contoh 1 (transformasi XML ke XML) ===
Lembar gaya XSLT ini provides templates untuk transformasi dokumen XML :<sourcesyntaxhighlight lang="xml">
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
Baris 65:
 
</xsl:stylesheet>
</syntaxhighlight>
</source>
 
Its evaluation results in a new XML document, having another structure:
 
<sourcesyntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<root>
Baris 75:
<name username="MI1">Morka</name>
</root>
</syntaxhighlight>
</source>
 
=== Contoh 2 (transformasi XML ke XHTML) ===
Conntoh Lembar gaya XSLT :
<sourcesyntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
Baris 110:
 
</xsl:stylesheet>
</syntaxhighlight>
</source>
 
[[XHTML]] output that this would produce ([[whitespace (computer science)|whitespace]] has been adjusted here for clarity):
{| width="100%" border="0"
|
<sourcesyntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
Baris 127:
</body>
</html>
</syntaxhighlight>
</source>
|&nbsp;
|align="center"|[[Berkas:xslt ex2.png]]{{br}}{{br}}{{br}}{{br}}How the XHTML appears when rendered in a [[web browser]].
Baris 136:
 
== Pranala luar ==
* [http://www.w3.org/TR/xslt XSLT 1.0 W3C Recommendation] {{Webarchive|url=https://web.archive.org/web/20170813015028/http://www.w3.org/TR/xslt |date=2017-08-13 }}
* [http://www.w3.org/TR/xslt20/ XSLT 2.0 W3C Recommendation] {{Webarchive|url=https://web.archive.org/web/20060613010826/http://www.w3.org/TR/xslt20/ |date=2006-06-13 }}
* [http://www.dpawson.co.uk/xsl XSLT Frequently Asked Questions] {{Webarchive|url=https://web.archive.org/web/20080511084110/http://dpawson.co.uk/xsl/ |date=2008-05-11 }}
 
{{Standar W3C}}
{{Authority control}}
 
[[Kategori:Standar W3C]]