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!
==Design and processing model== [[Image:XSLT en.svg|right|thumb|Diagram of the basic elements and process flow of eXtensible Stylesheet Language Transformations.]] The XSLT processor takes one or more XML source documents, plus one or more XSLT stylesheets, and processes them to produce one or multiple output documents.<ref>{{Citation |last1=Flatt |first1=Amelie |title=Phase III: Generating Artifacts from the Model |date=2022 |url=https://link.springer.com/10.1007/978-3-031-14132-4_5 |work=Model-Driven Development of Akoma Ntoso Application Profiles |pages=31β37 |place=Cham |publisher=Springer International Publishing |language=en |doi=10.1007/978-3-031-14132-4_5 |isbn=978-3-031-14131-7 |access-date=2023-01-07 |last2=Langner |first2=Arne |last3=Leps |first3=Olof}}</ref><ref>{{Cite web |title=XSL Transformations (XSLT) Version 2.0 (Second Edition) |url=https://www.w3.org/TR/xslt20/#creating-result-trees |access-date=2023-02-07 |website=www.w3.org |quote=Example: Multiple Result Documents}}</ref> In contrast to widely implemented [[imperative programming]] languages like [[C (programming language)|C]], XSLT is [[Declarative programming|declarative]].<ref>{{cite web |title=Discover the Wonders of XSLT: XSLT Quirks |url=http://www.developer.com/xml/article.php/3357231#Coding%20styles |quote=XSLT is a very specialized language with a distinct declarative flavor. |access-date=2011-02-11 |archive-date=2011-07-09 |archive-url=https://web.archive.org/web/20110709015528/http://www.developer.com/xml/article.php/3357231#Coding%20styles |url-status=dead }}</ref> The basic processing paradigm is pattern matching.<ref name=IBM>{{cite web|last=Kay|first=Michael|title=What kind of language is XSLT?|url=http://www.ibm.com/developerworks/library/x-xslt/|publisher=IBM|access-date=13 November 2013}}</ref> Rather than listing an imperative sequence of actions to perform in a stateful environment, template rules only define how to handle a node matching a particular XPath-like pattern, if the processor should happen to encounter one, and the contents of the templates effectively comprise [[functional programming|functional]] [[expression (programming)|expressions]] that directly represent their evaluated form: the result tree, which is the basis of the processor's output. A typical processor behaves as follows. First, assuming a stylesheet has already been read and prepared, the processor builds a source [[Tree data structure|tree]] from the input XML document. It then processes the source tree's root node, finds the best-matching template for that node in the stylesheet, and evaluates the template's contents. Instructions in each template generally direct the processor to either create nodes in the result tree, or to process more nodes in the source tree in the same way as the root node. Finally the result tree is serialized as XML or HTML text.
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