From 58123622e21507c68f833634f401eeb54abd360f Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Thu, 8 Jun 2023 12:55:26 +0200 Subject: [PATCH] feat: Add XSLT and XPATH sidebars --- files/en-us/web/xpath/axes/index.md | 4 +-- .../comparison_with_css_selectors/index.md | 34 +------------------ .../web/xpath/functions/boolean/index.md | 2 +- .../web/xpath/functions/ceiling/index.md | 2 +- .../en-us/web/xpath/functions/choose/index.md | 2 +- .../en-us/web/xpath/functions/concat/index.md | 2 +- .../web/xpath/functions/contains/index.md | 2 +- .../en-us/web/xpath/functions/count/index.md | 2 +- .../web/xpath/functions/current/index.md | 2 +- .../web/xpath/functions/document/index.md | 2 +- .../functions/element-available/index.md | 2 +- .../en-us/web/xpath/functions/false/index.md | 2 +- .../en-us/web/xpath/functions/floor/index.md | 2 +- .../xpath/functions/format-number/index.md | 2 +- .../functions/function-available/index.md | 2 +- .../web/xpath/functions/generate-id/index.md | 2 +- files/en-us/web/xpath/functions/id/index.md | 2 +- files/en-us/web/xpath/functions/index.md | 6 +--- files/en-us/web/xpath/functions/key/index.md | 2 +- files/en-us/web/xpath/functions/lang/index.md | 2 +- files/en-us/web/xpath/functions/last/index.md | 2 +- .../web/xpath/functions/local-name/index.md | 2 +- files/en-us/web/xpath/functions/name/index.md | 2 +- .../xpath/functions/namespace-uri/index.md | 2 +- .../xpath/functions/normalize-space/index.md | 2 +- files/en-us/web/xpath/functions/not/index.md | 2 +- .../en-us/web/xpath/functions/number/index.md | 2 +- .../web/xpath/functions/position/index.md | 2 +- .../en-us/web/xpath/functions/round/index.md | 2 +- .../web/xpath/functions/starts-with/index.md | 2 +- .../xpath/functions/string-length/index.md | 2 +- .../en-us/web/xpath/functions/string/index.md | 2 +- .../xpath/functions/substring-after/index.md | 2 +- .../xpath/functions/substring-before/index.md | 2 +- .../web/xpath/functions/substring/index.md | 2 +- files/en-us/web/xpath/functions/sum/index.md | 2 +- .../xpath/functions/system-property/index.md | 2 +- .../web/xpath/functions/translate/index.md | 2 +- files/en-us/web/xpath/functions/true/index.md | 2 +- .../functions/unparsed-entity-url/index.md | 2 +- files/en-us/web/xpath/index.md | 16 +-------- .../index.md | 4 +-- files/en-us/web/xpath/snippets/index.md | 4 +-- files/en-us/web/xslt/common_errors/index.md | 2 ++ .../web/xslt/element/apply-imports/index.md | 2 +- .../web/xslt/element/apply-templates/index.md | 2 +- .../web/xslt/element/attribute-set/index.md | 2 +- .../en-us/web/xslt/element/attribute/index.md | 2 +- .../web/xslt/element/call-template/index.md | 2 +- files/en-us/web/xslt/element/choose/index.md | 2 +- files/en-us/web/xslt/element/comment/index.md | 2 +- files/en-us/web/xslt/element/copy-of/index.md | 2 +- files/en-us/web/xslt/element/copy/index.md | 2 +- .../web/xslt/element/decimal-format/index.md | 2 +- files/en-us/web/xslt/element/element/index.md | 2 +- .../en-us/web/xslt/element/fallback/index.md | 2 +- .../en-us/web/xslt/element/for-each/index.md | 2 +- files/en-us/web/xslt/element/if/index.md | 2 +- files/en-us/web/xslt/element/import/index.md | 2 +- files/en-us/web/xslt/element/include/index.md | 2 +- files/en-us/web/xslt/element/index.md | 2 +- files/en-us/web/xslt/element/key/index.md | 2 +- files/en-us/web/xslt/element/message/index.md | 2 +- .../web/xslt/element/namespace-alias/index.md | 2 +- files/en-us/web/xslt/element/number/index.md | 2 +- .../en-us/web/xslt/element/otherwise/index.md | 2 +- files/en-us/web/xslt/element/output/index.md | 2 +- files/en-us/web/xslt/element/param/index.md | 2 +- .../web/xslt/element/preserve-space/index.md | 2 +- .../element/processing-instruction/index.md | 2 +- files/en-us/web/xslt/element/sort/index.md | 2 +- .../web/xslt/element/strip-space/index.md | 2 +- .../web/xslt/element/stylesheet/index.md | 2 +- .../en-us/web/xslt/element/template/index.md | 2 +- files/en-us/web/xslt/element/text/index.md | 2 +- .../en-us/web/xslt/element/transform/index.md | 2 +- .../en-us/web/xslt/element/value-of/index.md | 2 +- .../en-us/web/xslt/element/variable/index.md | 2 +- files/en-us/web/xslt/element/when/index.md | 2 +- .../web/xslt/element/with-param/index.md | 2 +- files/en-us/web/xslt/index.md | 2 +- files/en-us/web/xslt/pi_parameters/index.md | 2 ++ .../an_overview/index.md | 2 ++ .../for_further_reading/index.md | 2 ++ .../xslt/transforming_xml_with_xslt/index.md | 2 +- .../axes/ancestor-or-self/index.md | 2 ++ .../axes/ancestor/index.md | 2 ++ .../axes/attribute/index.md | 2 ++ .../axes/child/index.md | 2 ++ .../axes/descendant-or-self/index.md | 2 ++ .../axes/descendant/index.md | 2 ++ .../axes/following-sibling/index.md | 2 ++ .../axes/following/index.md | 2 ++ .../axes/namespace/index.md | 2 ++ .../axes/parent/index.md | 2 ++ .../axes/preceding-sibling/index.md | 2 ++ .../axes/preceding/index.md | 2 ++ .../axes/self/index.md | 2 ++ .../index.md | 2 ++ .../index.md | 2 ++ .../advanced_example/index.md | 2 ++ .../basic_example/index.md | 2 ++ .../xslt/xslt_js_interface_in_gecko/index.md | 2 ++ .../interface_list/index.md | 2 ++ .../introduction/index.md | 2 ++ .../javascript_xslt_bindings/index.md | 2 ++ .../resources/index.md | 2 ++ .../setting_parameters/index.md | 2 ++ 108 files changed, 135 insertions(+), 137 deletions(-) diff --git a/files/en-us/web/xpath/axes/index.md b/files/en-us/web/xpath/axes/index.md index e2b524d15402db0..29433592517605d 100644 --- a/files/en-us/web/xpath/axes/index.md +++ b/files/en-us/web/xpath/axes/index.md @@ -3,9 +3,7 @@ title: Axes slug: Web/XPath/Axes --- - +{{XsltSidebar}} There are thirteen different axes in the [XPath](/en-US/docs/Web/XPath) specification. An axis represents a relationship to the context node, and is used to locate nodes relative to that node on the tree. diff --git a/files/en-us/web/xpath/comparison_with_css_selectors/index.md b/files/en-us/web/xpath/comparison_with_css_selectors/index.md index 2853ecf0e874bcd..28d41acc2841b63 100644 --- a/files/en-us/web/xpath/comparison_with_css_selectors/index.md +++ b/files/en-us/web/xpath/comparison_with_css_selectors/index.md @@ -3,9 +3,7 @@ title: Comparison of CSS Selectors and XPath slug: Web/XPath/Comparison_with_CSS_selectors --- - +{{XsltSidebar}} This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job. @@ -17,33 +15,3 @@ This article seeks to document the difference between CSS Selectors and XPath fo | [`descendant`](/en-US/docs/Web/XPath/Axes#descendant) axis | [Descendant combinator](/en-US/docs/Web/CSS/Descendant_combinator) | | [`following-sibling`](/en-US/docs/Web/XPath/Axes#following-sibling) axis | [General sibling combinator](/en-US/docs/Web/CSS/General_sibling_combinator) or [adjacent sibling combinator](/en-US/docs/Web/CSS/Adjacent_sibling_combinator) | | [`self`](/en-US/docs/Web/XPath/Axes#self) axis | {{CSSxRef(":scope")}} or {{CSSxRef(":host")}} selector | - - diff --git a/files/en-us/web/xpath/functions/boolean/index.md b/files/en-us/web/xpath/functions/boolean/index.md index b679eef6bdc9f46..25779948b75cd30 100644 --- a/files/en-us/web/xpath/functions/boolean/index.md +++ b/files/en-us/web/xpath/functions/boolean/index.md @@ -3,7 +3,7 @@ title: boolean slug: Web/XPath/Functions/boolean --- -{{XsltRef()}} +{{XsltSidebar}} The `boolean` function evaluates an expression and returns true or false. diff --git a/files/en-us/web/xpath/functions/ceiling/index.md b/files/en-us/web/xpath/functions/ceiling/index.md index 442f4b73c324fbc..63120c241271677 100644 --- a/files/en-us/web/xpath/functions/ceiling/index.md +++ b/files/en-us/web/xpath/functions/ceiling/index.md @@ -3,7 +3,7 @@ title: ceiling slug: Web/XPath/Functions/ceiling --- -{{ XsltRef() }} +{{XsltSidebar}} The `ceiling` function evaluates a decimal number and returns the smallest integer greater than or equal to the decimal number. diff --git a/files/en-us/web/xpath/functions/choose/index.md b/files/en-us/web/xpath/functions/choose/index.md index 83b8e4debf84154..e7853033b98df77 100644 --- a/files/en-us/web/xpath/functions/choose/index.md +++ b/files/en-us/web/xpath/functions/choose/index.md @@ -3,7 +3,7 @@ title: choose slug: Web/XPath/Functions/choose --- -{{ XsltRef() }} +{{XsltSidebar}} The `choose` function returns one of the specified objects based on a boolean parameter. diff --git a/files/en-us/web/xpath/functions/concat/index.md b/files/en-us/web/xpath/functions/concat/index.md index f77936ef374a9ab..895f9c2865dc6d2 100644 --- a/files/en-us/web/xpath/functions/concat/index.md +++ b/files/en-us/web/xpath/functions/concat/index.md @@ -3,7 +3,7 @@ title: concat slug: Web/XPath/Functions/concat --- -{{ XsltRef() }} +{{XsltSidebar}} The `concat` function concatenates two or more strings and returns the resulting string. diff --git a/files/en-us/web/xpath/functions/contains/index.md b/files/en-us/web/xpath/functions/contains/index.md index 216d1a24473c6a1..2b69041f2882de7 100644 --- a/files/en-us/web/xpath/functions/contains/index.md +++ b/files/en-us/web/xpath/functions/contains/index.md @@ -3,7 +3,7 @@ title: contains slug: Web/XPath/Functions/contains --- -{{ XsltRef() }} +{{XsltSidebar}} The `contains` function determines whether the first argument string contains the second argument string and returns boolean true or false. diff --git a/files/en-us/web/xpath/functions/count/index.md b/files/en-us/web/xpath/functions/count/index.md index 8fb6374707f45f1..052ee6c2d073190 100644 --- a/files/en-us/web/xpath/functions/count/index.md +++ b/files/en-us/web/xpath/functions/count/index.md @@ -3,7 +3,7 @@ title: count slug: Web/XPath/Functions/count --- -{{ XsltRef() }} +{{XsltSidebar}} The `count` function counts the number of nodes in a node-set and returns an integer. diff --git a/files/en-us/web/xpath/functions/current/index.md b/files/en-us/web/xpath/functions/current/index.md index 16cc9f619ba273c..ccbe64e5982823f 100644 --- a/files/en-us/web/xpath/functions/current/index.md +++ b/files/en-us/web/xpath/functions/current/index.md @@ -3,7 +3,7 @@ title: current slug: Web/XPath/Functions/current --- -{{ XsltRef() }} +{{XsltSidebar}} The `current` function can be used to get the context node in an XSLT instruction. diff --git a/files/en-us/web/xpath/functions/document/index.md b/files/en-us/web/xpath/functions/document/index.md index 5da1d9d411ccfc7..fe5eb0b25a017e9 100644 --- a/files/en-us/web/xpath/functions/document/index.md +++ b/files/en-us/web/xpath/functions/document/index.md @@ -3,7 +3,7 @@ title: document slug: Web/XPath/Functions/document --- -{{ XsltRef() }} +{{XsltSidebar}} The `document` finds a node-set in an external document, or multiple external documents, and returns the resulting node-set. diff --git a/files/en-us/web/xpath/functions/element-available/index.md b/files/en-us/web/xpath/functions/element-available/index.md index 9d11bb79c113b83..6ee480573dce6c8 100644 --- a/files/en-us/web/xpath/functions/element-available/index.md +++ b/files/en-us/web/xpath/functions/element-available/index.md @@ -3,7 +3,7 @@ title: element-available slug: Web/XPath/Functions/element-available --- -{{ XsltRef() }} +{{XsltSidebar}} The `element-available` function determines if an element is available and returns true or false. diff --git a/files/en-us/web/xpath/functions/false/index.md b/files/en-us/web/xpath/functions/false/index.md index e0529e449214a34..2cdf92f53d36192 100644 --- a/files/en-us/web/xpath/functions/false/index.md +++ b/files/en-us/web/xpath/functions/false/index.md @@ -3,7 +3,7 @@ title: "false" slug: Web/XPath/Functions/false --- -{{ XsltRef() }} +{{XsltSidebar}} The `false` function returns boolean false. diff --git a/files/en-us/web/xpath/functions/floor/index.md b/files/en-us/web/xpath/functions/floor/index.md index 1321400f4b3cef8..ce7d109cb9174be 100644 --- a/files/en-us/web/xpath/functions/floor/index.md +++ b/files/en-us/web/xpath/functions/floor/index.md @@ -3,7 +3,7 @@ title: floor slug: Web/XPath/Functions/floor --- -{{ XsltRef() }} +{{XsltSidebar}} The `floor` function evaluates a decimal number and returns the largest integer less than or equal to the decimal number. diff --git a/files/en-us/web/xpath/functions/format-number/index.md b/files/en-us/web/xpath/functions/format-number/index.md index df297ea9b518942..e39a1b7d9135533 100644 --- a/files/en-us/web/xpath/functions/format-number/index.md +++ b/files/en-us/web/xpath/functions/format-number/index.md @@ -3,7 +3,7 @@ title: format-number slug: Web/XPath/Functions/format-number --- -{{ XsltRef() }} +{{XsltSidebar}} The `format-number` function evaluates a number and returns a string representing the number in a given format. diff --git a/files/en-us/web/xpath/functions/function-available/index.md b/files/en-us/web/xpath/functions/function-available/index.md index 5955c13ec51c21d..34715ede0f9fb8d 100644 --- a/files/en-us/web/xpath/functions/function-available/index.md +++ b/files/en-us/web/xpath/functions/function-available/index.md @@ -3,7 +3,7 @@ title: function-available slug: Web/XPath/Functions/function-available --- -{{ XsltRef() }} +{{XsltSidebar}} The `function-available` function determines if a given function is available and returns boolean true or false. diff --git a/files/en-us/web/xpath/functions/generate-id/index.md b/files/en-us/web/xpath/functions/generate-id/index.md index a9ec198015ed293..e5466e114d80ccb 100644 --- a/files/en-us/web/xpath/functions/generate-id/index.md +++ b/files/en-us/web/xpath/functions/generate-id/index.md @@ -3,7 +3,7 @@ title: generate-id slug: Web/XPath/Functions/generate-id --- -{{ XsltRef() }} +{{XsltSidebar}} The `generate-id` function generates a unique id for the first node in a given node-set and returns a string containing that id. diff --git a/files/en-us/web/xpath/functions/id/index.md b/files/en-us/web/xpath/functions/id/index.md index 6a86ed7760663e1..7804d1b1f2996c1 100644 --- a/files/en-us/web/xpath/functions/id/index.md +++ b/files/en-us/web/xpath/functions/id/index.md @@ -3,7 +3,7 @@ title: id slug: Web/XPath/Functions/id --- -{{ XsltRef() }} +{{XsltSidebar}} The `id` function finds nodes matching the given ids and returns a node-set containing the identified nodes. diff --git a/files/en-us/web/xpath/functions/index.md b/files/en-us/web/xpath/functions/index.md index 23ca7c9793693bd..1660a8ed4067bc8 100644 --- a/files/en-us/web/xpath/functions/index.md +++ b/files/en-us/web/xpath/functions/index.md @@ -3,9 +3,7 @@ title: Functions slug: Web/XPath/Functions --- - +{{XsltSidebar}} The following is an annotated list of core [XPath](/en-US/docs/Web/XPath) functions and [XSLT](/en-US/docs/Web/XSLT)-specific additions to XPath, including a description, syntax, a list of arguments, result-type, source in the appropriate W3C Recommendation. For further information on using XPath/XSLT functions, please see the [For Further Reading](/en-US/docs/Web/XSLT/Transforming_XML_with_XSLT) page. @@ -46,5 +44,3 @@ The following is an annotated list of core [XPath](/en-US/docs/Web/XPath) functi - [translate()](/en-US/docs/Web/XPath/Functions/translate) - [true()](/en-US/docs/Web/XPath/Functions/true) - [unparsed-entity-url()](/en-US/docs/Web/XPath/Functions/unparsed-entity-url) _XSLT-specific_ - -{{QuickLinksWithSubpages("/en-US/docs/Web/XPath")}} diff --git a/files/en-us/web/xpath/functions/key/index.md b/files/en-us/web/xpath/functions/key/index.md index 1e19746fd28688b..997c0a857a0d285 100644 --- a/files/en-us/web/xpath/functions/key/index.md +++ b/files/en-us/web/xpath/functions/key/index.md @@ -3,7 +3,7 @@ title: key slug: Web/XPath/Functions/key --- -{{ XsltRef() }} +{{XsltSidebar}} The `key` function returns a node-set of nodes that have the given value for the given key. diff --git a/files/en-us/web/xpath/functions/lang/index.md b/files/en-us/web/xpath/functions/lang/index.md index fab545fa398703c..231062e318e2546 100644 --- a/files/en-us/web/xpath/functions/lang/index.md +++ b/files/en-us/web/xpath/functions/lang/index.md @@ -3,7 +3,7 @@ title: lang slug: Web/XPath/Functions/lang --- -{{ XsltRef() }} +{{XsltSidebar}} The `lang` function determines whether the context node matches the given language and returns boolean true or false. diff --git a/files/en-us/web/xpath/functions/last/index.md b/files/en-us/web/xpath/functions/last/index.md index 04f510e15cdfc08..60d38a0786ad916 100644 --- a/files/en-us/web/xpath/functions/last/index.md +++ b/files/en-us/web/xpath/functions/last/index.md @@ -3,7 +3,7 @@ title: last slug: Web/XPath/Functions/last --- -{{ XsltRef() }} +{{XsltSidebar}} The `last` function returns a number equal to the context size from the expression evaluation context. diff --git a/files/en-us/web/xpath/functions/local-name/index.md b/files/en-us/web/xpath/functions/local-name/index.md index d8fbe43288d178d..37e8e52c1b464d1 100644 --- a/files/en-us/web/xpath/functions/local-name/index.md +++ b/files/en-us/web/xpath/functions/local-name/index.md @@ -3,7 +3,7 @@ title: local-name slug: Web/XPath/Functions/local-name --- -{{ XsltRef() }} +{{XsltSidebar}} The `local-name` function returns a string representing the local name of the first node in a given node-set. diff --git a/files/en-us/web/xpath/functions/name/index.md b/files/en-us/web/xpath/functions/name/index.md index 02d8524d9e754e9..55a1643a76ec7ca 100644 --- a/files/en-us/web/xpath/functions/name/index.md +++ b/files/en-us/web/xpath/functions/name/index.md @@ -3,7 +3,7 @@ title: name slug: Web/XPath/Functions/name --- -{{ XsltRef() }} +{{XsltSidebar}} The `name` function returns a string representing the QName of the first node in a given node-set. diff --git a/files/en-us/web/xpath/functions/namespace-uri/index.md b/files/en-us/web/xpath/functions/namespace-uri/index.md index 30e785f350339ea..7e3b5a308c0b324 100644 --- a/files/en-us/web/xpath/functions/namespace-uri/index.md +++ b/files/en-us/web/xpath/functions/namespace-uri/index.md @@ -3,7 +3,7 @@ title: namespace-uri slug: Web/XPath/Functions/namespace-uri --- -{{ XsltRef() }} +{{XsltSidebar}} The `namespace-uri` function returns a string representing the namespace URI of the first node in a given node-set. diff --git a/files/en-us/web/xpath/functions/normalize-space/index.md b/files/en-us/web/xpath/functions/normalize-space/index.md index a78e2b621b0fff4..afcb669ba27d8f7 100644 --- a/files/en-us/web/xpath/functions/normalize-space/index.md +++ b/files/en-us/web/xpath/functions/normalize-space/index.md @@ -3,7 +3,7 @@ title: normalize-space slug: Web/XPath/Functions/normalize-space --- -{{ XsltRef() }} +{{XsltSidebar}} The `normalize-space` function strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string. diff --git a/files/en-us/web/xpath/functions/not/index.md b/files/en-us/web/xpath/functions/not/index.md index b116aebf631dad4..e3ebca95b08c852 100644 --- a/files/en-us/web/xpath/functions/not/index.md +++ b/files/en-us/web/xpath/functions/not/index.md @@ -3,7 +3,7 @@ title: not slug: Web/XPath/Functions/not --- -{{ XsltRef() }} +{{XsltSidebar}} The `not` function evaluates a boolean expression and returns the opposite value. diff --git a/files/en-us/web/xpath/functions/number/index.md b/files/en-us/web/xpath/functions/number/index.md index ee90ac4dfcdf10b..4fb95c0586cc097 100644 --- a/files/en-us/web/xpath/functions/number/index.md +++ b/files/en-us/web/xpath/functions/number/index.md @@ -3,7 +3,7 @@ title: number slug: Web/XPath/Functions/number --- -{{ XsltRef() }} +{{XsltSidebar}} The `number` function converts an object to a number and returns the number. diff --git a/files/en-us/web/xpath/functions/position/index.md b/files/en-us/web/xpath/functions/position/index.md index 38882515b1b5c8d..b0e36075b0cf4f7 100644 --- a/files/en-us/web/xpath/functions/position/index.md +++ b/files/en-us/web/xpath/functions/position/index.md @@ -3,7 +3,7 @@ title: position slug: Web/XPath/Functions/position --- -{{ XsltRef() }} +{{XsltSidebar}} The `position` function returns a number equal to the context position from the expression evaluation context. diff --git a/files/en-us/web/xpath/functions/round/index.md b/files/en-us/web/xpath/functions/round/index.md index df2c35b7cf28cdd..36a7f5b2277c8b1 100644 --- a/files/en-us/web/xpath/functions/round/index.md +++ b/files/en-us/web/xpath/functions/round/index.md @@ -3,7 +3,7 @@ title: round slug: Web/XPath/Functions/round --- -{{ XsltRef() }} +{{XsltSidebar}} The `round` function returns a number that is the nearest integer to the given number. diff --git a/files/en-us/web/xpath/functions/starts-with/index.md b/files/en-us/web/xpath/functions/starts-with/index.md index 287ab50592b8166..ba5a2619d85d39f 100644 --- a/files/en-us/web/xpath/functions/starts-with/index.md +++ b/files/en-us/web/xpath/functions/starts-with/index.md @@ -3,7 +3,7 @@ title: starts-with slug: Web/XPath/Functions/starts-with --- -{{ XsltRef() }} +{{XsltSidebar}} The `starts-with` checks whether the first string starts with the second string and returns true or false. diff --git a/files/en-us/web/xpath/functions/string-length/index.md b/files/en-us/web/xpath/functions/string-length/index.md index 57895c3457d1b6c..6328e4c86d80ce4 100644 --- a/files/en-us/web/xpath/functions/string-length/index.md +++ b/files/en-us/web/xpath/functions/string-length/index.md @@ -3,7 +3,7 @@ title: string-length slug: Web/XPath/Functions/string-length --- -{{ XsltRef() }} +{{XsltSidebar}} The `string-length` function returns a number equal to the number of characters in a given string. diff --git a/files/en-us/web/xpath/functions/string/index.md b/files/en-us/web/xpath/functions/string/index.md index ed60d54d2c934cd..3b0380d06f82c94 100644 --- a/files/en-us/web/xpath/functions/string/index.md +++ b/files/en-us/web/xpath/functions/string/index.md @@ -3,7 +3,7 @@ title: string slug: Web/XPath/Functions/string --- -{{ XsltRef() }} +{{XsltSidebar}} The `string` function converts the given argument to a string. diff --git a/files/en-us/web/xpath/functions/substring-after/index.md b/files/en-us/web/xpath/functions/substring-after/index.md index 9e4bfbac66f25fc..2e423f93dedfce8 100644 --- a/files/en-us/web/xpath/functions/substring-after/index.md +++ b/files/en-us/web/xpath/functions/substring-after/index.md @@ -3,7 +3,7 @@ title: substring-after slug: Web/XPath/Functions/substring-after --- -{{ XsltRef() }} +{{XsltSidebar}} The `substring-after` function returns a string that is the rest of a given string after a given substring. diff --git a/files/en-us/web/xpath/functions/substring-before/index.md b/files/en-us/web/xpath/functions/substring-before/index.md index 6ce097bbef1974e..6517862712d0aaf 100644 --- a/files/en-us/web/xpath/functions/substring-before/index.md +++ b/files/en-us/web/xpath/functions/substring-before/index.md @@ -3,7 +3,7 @@ title: substring-before slug: Web/XPath/Functions/substring-before --- -{{ XsltRef() }} +{{XsltSidebar}} The `substring-before` function returns a string that is the part of a given string before a given substring. diff --git a/files/en-us/web/xpath/functions/substring/index.md b/files/en-us/web/xpath/functions/substring/index.md index b52e601f3c2bae1..71fbb50ae01f6fb 100644 --- a/files/en-us/web/xpath/functions/substring/index.md +++ b/files/en-us/web/xpath/functions/substring/index.md @@ -3,7 +3,7 @@ title: substring slug: Web/XPath/Functions/substring --- -{{ XsltRef() }} +{{XsltSidebar}} The `substring` function returns a part of a given string. diff --git a/files/en-us/web/xpath/functions/sum/index.md b/files/en-us/web/xpath/functions/sum/index.md index e62b294b8b16b15..d58735fb23bd978 100644 --- a/files/en-us/web/xpath/functions/sum/index.md +++ b/files/en-us/web/xpath/functions/sum/index.md @@ -3,7 +3,7 @@ title: sum slug: Web/XPath/Functions/sum --- -{{ XsltRef() }} +{{XsltSidebar}} The `sum` function returns a number that is the sum of the numeric values of each node in a given node-set. diff --git a/files/en-us/web/xpath/functions/system-property/index.md b/files/en-us/web/xpath/functions/system-property/index.md index 4572e8f1eb89f08..dd9e29b0054ff17 100644 --- a/files/en-us/web/xpath/functions/system-property/index.md +++ b/files/en-us/web/xpath/functions/system-property/index.md @@ -3,7 +3,7 @@ title: system-property slug: Web/XPath/Functions/system-property --- -{{ XsltRef() }} +{{XsltSidebar}} The `system-property` function returns an object representing the given system-property. diff --git a/files/en-us/web/xpath/functions/translate/index.md b/files/en-us/web/xpath/functions/translate/index.md index 62a220559f78f23..fd1e15d438c39f0 100644 --- a/files/en-us/web/xpath/functions/translate/index.md +++ b/files/en-us/web/xpath/functions/translate/index.md @@ -3,7 +3,7 @@ title: translate slug: Web/XPath/Functions/translate --- -{{ XsltRef() }} +{{XsltSidebar}} The `translate` function evaluates a string and a set of characters to translate and returns the translated string. diff --git a/files/en-us/web/xpath/functions/true/index.md b/files/en-us/web/xpath/functions/true/index.md index 56bd45c0d3313b9..72c3e8d014e0edf 100644 --- a/files/en-us/web/xpath/functions/true/index.md +++ b/files/en-us/web/xpath/functions/true/index.md @@ -3,7 +3,7 @@ title: "true" slug: Web/XPath/Functions/true --- -{{ XsltRef() }} +{{XsltSidebar}} The `true` function returns a boolean value of true. diff --git a/files/en-us/web/xpath/functions/unparsed-entity-url/index.md b/files/en-us/web/xpath/functions/unparsed-entity-url/index.md index 794222d1f3be1d2..b7d709b7e808bc9 100644 --- a/files/en-us/web/xpath/functions/unparsed-entity-url/index.md +++ b/files/en-us/web/xpath/functions/unparsed-entity-url/index.md @@ -3,7 +3,7 @@ title: unparsed-entity-url slug: Web/XPath/Functions/unparsed-entity-url --- -{{ XsltRef() }} +{{XsltSidebar}} The `unparsed-entity-url()` function returns the URI of the unparsed entity with the given name. This is non-XML data referenced in the DTD of the source document. diff --git a/files/en-us/web/xpath/index.md b/files/en-us/web/xpath/index.md index 99720f68629c9bf..238cda12756e36d 100644 --- a/files/en-us/web/xpath/index.md +++ b/files/en-us/web/xpath/index.md @@ -3,21 +3,7 @@ title: XPath slug: Web/XPath --- - +{{XsltSidebar}} XPath stands for XML Path Language. It uses a non-XML syntax to provide a flexible way of addressing (pointing to) different parts of an [XML](/en-US/docs/Web/XML/XML_introduction) document. It can also be used to test addressed nodes within a document to determine whether they match a pattern or not. diff --git a/files/en-us/web/xpath/introduction_to_using_xpath_in_javascript/index.md b/files/en-us/web/xpath/introduction_to_using_xpath_in_javascript/index.md index 95d32c8c013956b..9f7614cfe7e512c 100644 --- a/files/en-us/web/xpath/introduction_to_using_xpath_in_javascript/index.md +++ b/files/en-us/web/xpath/introduction_to_using_xpath_in_javascript/index.md @@ -3,9 +3,7 @@ title: Introduction to using XPath in JavaScript slug: Web/XPath/Introduction_to_using_XPath_in_JavaScript --- - +{{XsltSidebar}} This document describes the interface for using [XPath](/en-US/docs/Web/XPath) in JavaScript internally, in extensions, and from websites. Mozilla implements a fair amount of the [DOM 3 XPath](https://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/), which means that XPath expressions can be run against both HTML and XML documents. diff --git a/files/en-us/web/xpath/snippets/index.md b/files/en-us/web/xpath/snippets/index.md index 98fe9a5f01741a5..90ad13afd13b1d8 100644 --- a/files/en-us/web/xpath/snippets/index.md +++ b/files/en-us/web/xpath/snippets/index.md @@ -3,9 +3,7 @@ title: XPath snippets slug: Web/XPath/Snippets --- - +{{XsltSidebar}} This article provides some XPath code snippets — simple examples of how to a few simple **utility functions** based on standard interfaces from the [DOM Level 3 XPath specification](https://www.w3.org/TR/DOM-Level-3-XPath/) that expose XPath functionality to JavaScript code. The snippets are functions you can use in the real world in your own code. diff --git a/files/en-us/web/xslt/common_errors/index.md b/files/en-us/web/xslt/common_errors/index.md index b952969a7551ff4..898cf9160fa3f2f 100644 --- a/files/en-us/web/xslt/common_errors/index.md +++ b/files/en-us/web/xslt/common_errors/index.md @@ -3,6 +3,8 @@ title: Common XSLT Errors slug: Web/XSLT/Common_errors --- +{{XsltSidebar}} + ### MIME types Your server needs to send both the source and the stylesheet with a XML mime type, `text/xml` or `application/xml`. To find out the current type, load the file in Mozilla and look at the page info. Or use a download tool, those usually tell the mime type. diff --git a/files/en-us/web/xslt/element/apply-imports/index.md b/files/en-us/web/xslt/element/apply-imports/index.md index 36ce12f8a432f1c..da9e76f9cd50465 100644 --- a/files/en-us/web/xslt/element/apply-imports/index.md +++ b/files/en-us/web/xslt/element/apply-imports/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/apply-imports --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element is fairly arcane, used mostly in complex stylesheets. Import precedence requires that template rules in main stylesheets have higher precedence than template rules in imported stylesheets. Sometimes, however, it is useful to be able to force the processor to use a template rule from the (lower precedence) imported stylesheet rather than an equivalent rule in the main stylesheet. diff --git a/files/en-us/web/xslt/element/apply-templates/index.md b/files/en-us/web/xslt/element/apply-templates/index.md index ce97eee27f8ef84..c56aac4edc804ba 100644 --- a/files/en-us/web/xslt/element/apply-templates/index.md +++ b/files/en-us/web/xslt/element/apply-templates/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/apply-templates --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element selects a set of nodes in the input tree and instructs the processor to apply the proper templates to them. diff --git a/files/en-us/web/xslt/element/attribute-set/index.md b/files/en-us/web/xslt/element/attribute-set/index.md index 4b968fc2da711b2..1427080c291325f 100644 --- a/files/en-us/web/xslt/element/attribute-set/index.md +++ b/files/en-us/web/xslt/element/attribute-set/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/attribute-set --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element creates a named set of attributes, which can then be applied as whole to the output document, in a manner similar to named styles in CSS. diff --git a/files/en-us/web/xslt/element/attribute/index.md b/files/en-us/web/xslt/element/attribute/index.md index d9c67e58ef13885..b4388b718f6a2ba 100644 --- a/files/en-us/web/xslt/element/attribute/index.md +++ b/files/en-us/web/xslt/element/attribute/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/attribute --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element creates an attribute in the output document, using any values that can be accessed from the stylesheet. The element must be defined before any other output document element inside the output document element for which it establishes attribute values. But it may be after or inside elements that won't be part of the output (like `` or `` etc.). diff --git a/files/en-us/web/xslt/element/call-template/index.md b/files/en-us/web/xslt/element/call-template/index.md index 59f1b2b11566db3..bd3633a1d51b947 100644 --- a/files/en-us/web/xslt/element/call-template/index.md +++ b/files/en-us/web/xslt/element/call-template/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/call-template --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element invokes a named template. diff --git a/files/en-us/web/xslt/element/choose/index.md b/files/en-us/web/xslt/element/choose/index.md index 509ea53ebe33412..1767211bf33e72e 100644 --- a/files/en-us/web/xslt/element/choose/index.md +++ b/files/en-us/web/xslt/element/choose/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/choose --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element defines a choice among a number of alternatives. It behaves like a switch statement in procedural languages. diff --git a/files/en-us/web/xslt/element/comment/index.md b/files/en-us/web/xslt/element/comment/index.md index 8bbee09932f0db9..ae0833161ce0bb6 100644 --- a/files/en-us/web/xslt/element/comment/index.md +++ b/files/en-us/web/xslt/element/comment/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/comment --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element writes a comment to the output document. It must include only text. diff --git a/files/en-us/web/xslt/element/copy-of/index.md b/files/en-us/web/xslt/element/copy-of/index.md index 336459f82f2122e..36f8499055dda13 100644 --- a/files/en-us/web/xslt/element/copy-of/index.md +++ b/files/en-us/web/xslt/element/copy-of/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/copy-of --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element makes a deep copy (including descendant nodes) of whatever the select attribute specifies to the output document. diff --git a/files/en-us/web/xslt/element/copy/index.md b/files/en-us/web/xslt/element/copy/index.md index 91c2520c09ec36b..e9c265346501d33 100644 --- a/files/en-us/web/xslt/element/copy/index.md +++ b/files/en-us/web/xslt/element/copy/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/copy --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element transfers a shallow copy (the node and any associated namespace node) of the current node to the output document. It does not copy any children or attributes of the current node. diff --git a/files/en-us/web/xslt/element/decimal-format/index.md b/files/en-us/web/xslt/element/decimal-format/index.md index cd8fc47f1c12cb3..a860a77cfa3f30c 100644 --- a/files/en-us/web/xslt/element/decimal-format/index.md +++ b/files/en-us/web/xslt/element/decimal-format/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/decimal-format --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element defines the characters and symbols that are to be used in converting numbers into strings using the `format-number( )` function. diff --git a/files/en-us/web/xslt/element/element/index.md b/files/en-us/web/xslt/element/element/index.md index 3151b6e4e91ab3d..a3c082689b87d8d 100644 --- a/files/en-us/web/xslt/element/element/index.md +++ b/files/en-us/web/xslt/element/element/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/element --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element creates an element in the output document. diff --git a/files/en-us/web/xslt/element/fallback/index.md b/files/en-us/web/xslt/element/fallback/index.md index 7a3b443196717e5..6517e1ff47bc929 100644 --- a/files/en-us/web/xslt/element/fallback/index.md +++ b/files/en-us/web/xslt/element/fallback/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/fallback --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element specifies what template to use if a given extension (or, eventually, newer version) element is not supported. diff --git a/files/en-us/web/xslt/element/for-each/index.md b/files/en-us/web/xslt/element/for-each/index.md index 89d3a794d2f83ba..bf36ab42390845e 100644 --- a/files/en-us/web/xslt/element/for-each/index.md +++ b/files/en-us/web/xslt/element/for-each/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/for-each --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element selects a set of nodes and processes each of them in the same way. It is often used to iterate through a set of nodes or to change the current node. If one or more `` elements appear as the children of this element, sorting occurs before processing. Otherwise, nodes are processed in document order. diff --git a/files/en-us/web/xslt/element/if/index.md b/files/en-us/web/xslt/element/if/index.md index 2b41473aee4d918..122860389ad5362 100644 --- a/files/en-us/web/xslt/element/if/index.md +++ b/files/en-us/web/xslt/element/if/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/if --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element contains a test attribute and a template. If the test evaluates to true, the template is processed. In this it is similar to an if statement in other languages. To achieve the functionality of an if-then-else statement, however, use the `` element with one `` and one `` children. diff --git a/files/en-us/web/xslt/element/import/index.md b/files/en-us/web/xslt/element/import/index.md index 8ad8839dcdd7015..b618e477abbb408 100644 --- a/files/en-us/web/xslt/element/import/index.md +++ b/files/en-us/web/xslt/element/import/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/import --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element is a top-level element that serves to import the contents of one stylesheet into another stylesheet. Generally speaking, the contents of the imported stylesheet have a lower import precedence than that of the importing stylesheet. This is in contrast to `` where the contents of the included stylesheet have exactly the same precedence as the contents of the including stylesheet. diff --git a/files/en-us/web/xslt/element/include/index.md b/files/en-us/web/xslt/element/include/index.md index fbcdba77fed882a..1ccabb518d0b99f 100644 --- a/files/en-us/web/xslt/element/include/index.md +++ b/files/en-us/web/xslt/element/include/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/include --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element merges the contents of one stylesheet with another. Unlike the case of ``, the contents of an included stylesheet have exactly the same precedence as the contents of the including stylesheet. diff --git a/files/en-us/web/xslt/element/index.md b/files/en-us/web/xslt/element/index.md index 755138b8d33bf0d..d66b3213dee8ca8 100644 --- a/files/en-us/web/xslt/element/index.md +++ b/files/en-us/web/xslt/element/index.md @@ -3,7 +3,7 @@ title: XSLT elements reference slug: Web/XSLT/Element --- -{{XSLTRef}}{{QuickLinksWithSubpages("/en-US/docs/Web/XSLT")}} +{{XsltSidebar}} There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the child of either `` or ``. An instruction, on the other hand, is associated with a template. A stylesheet may include several templates. A third type of element, not discussed here, is the literal result element (LRE). An LRE also appears in a template. It consists of any non-instruction element that should be copied as-is to the result document, for example, an `
` element in an HTML conversion stylesheet. diff --git a/files/en-us/web/xslt/element/key/index.md b/files/en-us/web/xslt/element/key/index.md index 207a9cca5e6f4a5..98aced8249b65b6 100644 --- a/files/en-us/web/xslt/element/key/index.md +++ b/files/en-us/web/xslt/element/key/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/key --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element declares a named key which can be used elsewhere in the stylesheet with the `key( )` function. diff --git a/files/en-us/web/xslt/element/message/index.md b/files/en-us/web/xslt/element/message/index.md index e254cbd9ed84682..840f39cc694f342 100644 --- a/files/en-us/web/xslt/element/message/index.md +++ b/files/en-us/web/xslt/element/message/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/message --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element outputs a message (to the JavaScript Console in NS) and optionally terminates execution of the stylesheet. It can be useful for debugging. diff --git a/files/en-us/web/xslt/element/namespace-alias/index.md b/files/en-us/web/xslt/element/namespace-alias/index.md index 1b76b2ca309eda7..98609ed78ce45a4 100644 --- a/files/en-us/web/xslt/element/namespace-alias/index.md +++ b/files/en-us/web/xslt/element/namespace-alias/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/namespace-alias --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element is a rarely used device that maps a namespace in the stylesheet to a different namespace in the output tree. The most common use for this element is in generating a stylesheet from another stylesheet. To prevent a normally `xsl:`-prefixed literal result element (which should be copied as-is to the result tree) from being misunderstood by the processor, it is assigned a temporary namespace which is appropriately re-converted back to the XSLT namespace in the output tree. diff --git a/files/en-us/web/xslt/element/number/index.md b/files/en-us/web/xslt/element/number/index.md index 675ec05c023bbc6..1b76641636d3248 100644 --- a/files/en-us/web/xslt/element/number/index.md +++ b/files/en-us/web/xslt/element/number/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/number --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element counts things sequentially. It can also be used to quickly format a number. diff --git a/files/en-us/web/xslt/element/otherwise/index.md b/files/en-us/web/xslt/element/otherwise/index.md index 8ffc0a31124d231..12bfe8d5c89a1b5 100644 --- a/files/en-us/web/xslt/element/otherwise/index.md +++ b/files/en-us/web/xslt/element/otherwise/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/otherwise --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element is used to define the action that should be taken when none of the `` conditions apply. It is similar to the `else` or `default` case in other programming languages. diff --git a/files/en-us/web/xslt/element/output/index.md b/files/en-us/web/xslt/element/output/index.md index ab1903fd60bfcfa..5c7a332e479e0b9 100644 --- a/files/en-us/web/xslt/element/output/index.md +++ b/files/en-us/web/xslt/element/output/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/output --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element controls the characteristics of the output document. To function correctly in Netscape, this element, with the method attribute, must be used. As of 7.0, `method="text"` works as expected. diff --git a/files/en-us/web/xslt/element/param/index.md b/files/en-us/web/xslt/element/param/index.md index 9a457574a664fb8..d6e71182171d7a4 100644 --- a/files/en-us/web/xslt/element/param/index.md +++ b/files/en-us/web/xslt/element/param/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/param --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element establishes a parameter by name and, optionally, a default value for that parameter. When used as a top-level element, the parameter is global. When used inside an `` element, the parameter is local to that template. In this case it must be the first child element of the template. diff --git a/files/en-us/web/xslt/element/preserve-space/index.md b/files/en-us/web/xslt/element/preserve-space/index.md index fbaa11cdfb3e946..c98b3ea4158b042 100644 --- a/files/en-us/web/xslt/element/preserve-space/index.md +++ b/files/en-us/web/xslt/element/preserve-space/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/preserve-space --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element defines the elements in the source document for which whitespace should be preserved. If there is more than one element, separate the names with a whitespace character. Preserving whitespace is the default setting, so this element only needs to be used to counteract an `` element. diff --git a/files/en-us/web/xslt/element/processing-instruction/index.md b/files/en-us/web/xslt/element/processing-instruction/index.md index 2c081d49c883ccf..032ac31f8bfb266 100644 --- a/files/en-us/web/xslt/element/processing-instruction/index.md +++ b/files/en-us/web/xslt/element/processing-instruction/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/processing-instruction --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element writes a processing instruction to the output document. diff --git a/files/en-us/web/xslt/element/sort/index.md b/files/en-us/web/xslt/element/sort/index.md index 221baa07a7fab8c..f8fa551433196ec 100644 --- a/files/en-us/web/xslt/element/sort/index.md +++ b/files/en-us/web/xslt/element/sort/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/sort --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element defines a sort key for nodes selected by `` or `` and determines the order in which they are processed. diff --git a/files/en-us/web/xslt/element/strip-space/index.md b/files/en-us/web/xslt/element/strip-space/index.md index 2f3143f369b9c61..70ea45fa0f471fa 100644 --- a/files/en-us/web/xslt/element/strip-space/index.md +++ b/files/en-us/web/xslt/element/strip-space/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/strip-space --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element defines the elements in the source document for which whitespace should be removed. diff --git a/files/en-us/web/xslt/element/stylesheet/index.md b/files/en-us/web/xslt/element/stylesheet/index.md index 67e35e72fc74bd8..6a43e93f2a54cf4 100644 --- a/files/en-us/web/xslt/element/stylesheet/index.md +++ b/files/en-us/web/xslt/element/stylesheet/index.md @@ -4,7 +4,7 @@ slug: Web/XSLT/Element/stylesheet spec-urls: https://www.w3.org/TR/xslt-30/#stylesheet-element --- -{{XSLTRef}}{{QuickLinksWithSubpages("/en-US/docs/Web/XSLT")}} +{{XsltSidebar}} The `` element (or the equivalent `` element) is the outermost element of a stylesheet. diff --git a/files/en-us/web/xslt/element/template/index.md b/files/en-us/web/xslt/element/template/index.md index 6d7bafd3d9333d5..933d71c16b53495 100644 --- a/files/en-us/web/xslt/element/template/index.md +++ b/files/en-us/web/xslt/element/template/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/template --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element defines an output producing template. This element must have either the match attribute or the name attribute set. diff --git a/files/en-us/web/xslt/element/text/index.md b/files/en-us/web/xslt/element/text/index.md index ac762eb0fea5de2..af4a0893b2bf510 100644 --- a/files/en-us/web/xslt/element/text/index.md +++ b/files/en-us/web/xslt/element/text/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/text --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element writes literal text to the output tree. It may contain `#PCDATA`, literal text, and entity references. diff --git a/files/en-us/web/xslt/element/transform/index.md b/files/en-us/web/xslt/element/transform/index.md index ea2c20260a5e458..32544ea295d7ad2 100644 --- a/files/en-us/web/xslt/element/transform/index.md +++ b/files/en-us/web/xslt/element/transform/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/transform --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element is exactly equivalent to the [``](/en-US/docs/Web/XSLT/Element/stylesheet) element. diff --git a/files/en-us/web/xslt/element/value-of/index.md b/files/en-us/web/xslt/element/value-of/index.md index db714866e5a330c..54831294d695fe6 100644 --- a/files/en-us/web/xslt/element/value-of/index.md +++ b/files/en-us/web/xslt/element/value-of/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/value-of --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element evaluates an XPath expression, converts it to a string, and writes that string to the result tree. diff --git a/files/en-us/web/xslt/element/variable/index.md b/files/en-us/web/xslt/element/variable/index.md index 460425eebe6fced..e39b57efc9d1c36 100644 --- a/files/en-us/web/xslt/element/variable/index.md +++ b/files/en-us/web/xslt/element/variable/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/variable --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element declares a global or local variable in a stylesheet and gives it a value. Because XSLT permits no side-effects, once the value of the variable has been established, it remains the same until the variable goes out of scope diff --git a/files/en-us/web/xslt/element/when/index.md b/files/en-us/web/xslt/element/when/index.md index b4e048003adc4dd..1ca1139a536f351 100644 --- a/files/en-us/web/xslt/element/when/index.md +++ b/files/en-us/web/xslt/element/when/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/when --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element always appears within an `` element, acting like a case statement. diff --git a/files/en-us/web/xslt/element/with-param/index.md b/files/en-us/web/xslt/element/with-param/index.md index c1a31144b553785..ad855e254d19a5a 100644 --- a/files/en-us/web/xslt/element/with-param/index.md +++ b/files/en-us/web/xslt/element/with-param/index.md @@ -3,7 +3,7 @@ title: slug: Web/XSLT/Element/with-param --- -{{ XsltRef() }} +{{XsltSidebar}} The `` element sets the value of a parameter to be passed into a template. diff --git a/files/en-us/web/xslt/index.md b/files/en-us/web/xslt/index.md index 5eed14df109106a..4d5f93358063650 100644 --- a/files/en-us/web/xslt/index.md +++ b/files/en-us/web/xslt/index.md @@ -3,7 +3,7 @@ title: "XSLT: Extensible Stylesheet Language Transformations" slug: Web/XSLT --- -{{XSLTRef}} +{{XsltSidebar}} **Extensible Stylesheet Language Transformations (XSLT)** is an [XML](/en-US/docs/Web/XML/XML_introduction)-based language used, in conjunction with specialized processing software, for the transformation of XML documents. diff --git a/files/en-us/web/xslt/pi_parameters/index.md b/files/en-us/web/xslt/pi_parameters/index.md index 9c200317a395ed4..7b9904fbf39271d 100644 --- a/files/en-us/web/xslt/pi_parameters/index.md +++ b/files/en-us/web/xslt/pi_parameters/index.md @@ -3,6 +3,8 @@ title: PI Parameters slug: Web/XSLT/PI_Parameters --- +{{XsltSidebar}} + ### Overview XSLT supports the concept of passing parameters to a stylesheet when executing it. This has been possible for a while when using the {{domxref("XSLTProcessor")}} in JavaScript. However when using an `` processing instruction (PI) there used to be no way to provide parameters. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/an_overview/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/an_overview/index.md index 16849172b1a65a0..4fbe53ed1252667 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/an_overview/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/an_overview/index.md @@ -3,6 +3,8 @@ title: An overview slug: Web/XSLT/Transforming_XML_with_XSLT/An_Overview --- +{{XsltSidebar}} + [« Transforming XML with XSLT](/en-US/docs/Web/XSLT/Transforming_XML_with_XSLT) The eXtensible Stylesheet Language/Transform is a very powerful language, and a complete discussion of it is well beyond the scope of this article, but a brief discussion of some basic concepts will be helpful in understanding the description of Netscape's capabilities that follows. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/for_further_reading/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/for_further_reading/index.md index 50f8b2f8227cbcd..3514ed1fa57b1fd 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/for_further_reading/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/for_further_reading/index.md @@ -3,6 +3,8 @@ title: For further reading slug: Web/XSLT/Transforming_XML_with_XSLT/For_Further_Reading --- +{{XsltSidebar}} + [« Transforming XML with XSLT](/en-US/docs/Web/XSLT/Transforming_XML_with_XSLT) ## Print diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/index.md index 0b2f9c666d82471..bb20d4e470fa604 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/index.md @@ -3,7 +3,7 @@ title: Transforming XML with XSLT slug: Web/XSLT/Transforming_XML_with_XSLT --- -{{XSLTRef}} +{{XsltSidebar}} ## An Overview diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor-or-self/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor-or-self/index.md index c1cf09d66d92950..3c9f1f517e98f87 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor-or-self/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor-or-self/index.md @@ -3,4 +3,6 @@ title: ancestor-or-self slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/ancestor-or-self --- +{{XsltSidebar}} + The ancestor-or-self axis indicates the context node and all of its ancestors, including the root node. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor/index.md index b46b86c4654b98b..bace1dbc1a84bc4 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/ancestor/index.md @@ -3,4 +3,6 @@ title: ancestor slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/ancestor --- +{{XsltSidebar}} + The ancestor axis indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/attribute/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/attribute/index.md index 9e9a7f5bb56e7e3..f779207e3d76d6c 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/attribute/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/attribute/index.md @@ -3,4 +3,6 @@ title: attribute slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/attribute --- +{{XsltSidebar}} + The attribute axis indicates the attributes of the context node. Only elements have attributes. This axis can be abbreviated with the at sign (`@`). diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/child/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/child/index.md index d67eb4350b0e4e9..6a016450eedc438 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/child/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/child/index.md @@ -3,4 +3,6 @@ title: child slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/child --- +{{XsltSidebar}} + The child axis indicates the children of the context node. If an XPath expression does not specify an axis, the child axis is understood by default. Since only the root node or element nodes have children, any other use will select nothing. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant-or-self/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant-or-self/index.md index 4bdd47343b7873f..e95c71c238a61cd 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant-or-self/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant-or-self/index.md @@ -3,4 +3,6 @@ title: descendant-or-self slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/descendant-or-self --- +{{XsltSidebar}} + The descendant-or-self axis indicates the context node and all of its descendants. Attribute and namespace nodes are **not** included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant/index.md index 213ef83005a14a9..a23a1952ca5c134 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/descendant/index.md @@ -3,4 +3,6 @@ title: descendant slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/descendant --- +{{XsltSidebar}} + The descendant axis indicates all of the children of the context node, and all of their children, and so forth. Attribute and namespace nodes are **not** included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following-sibling/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following-sibling/index.md index e588945b010fa02..de619a5dc3cb5f7 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following-sibling/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following-sibling/index.md @@ -3,4 +3,6 @@ title: following-sibling slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/following-sibling --- +{{XsltSidebar}} + The following-sibling axis indicates all the nodes that have the same parent as the context node and appear after the context node in the source document. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following/index.md index 416460000cdf5a9..a46002a55333387 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/following/index.md @@ -3,4 +3,6 @@ title: following slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/following --- +{{XsltSidebar}} + The following axis indicates all the nodes that appear after the context node, except any descendant, attribute, and namespace nodes. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/namespace/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/namespace/index.md index fb1244034b0b5fe..bf06b5af90500f0 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/namespace/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/namespace/index.md @@ -3,4 +3,6 @@ title: namespace slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/namespace --- +{{XsltSidebar}} + The namespace axis indicates all the nodes that are in scope for the context node. In this case, the context node must be an element node. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/parent/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/parent/index.md index 809471ac75289ae..fd2fd431488d127 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/parent/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/parent/index.md @@ -3,4 +3,6 @@ title: parent slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/parent --- +{{XsltSidebar}} + The parent axis indicates the single node that is the parent of the context node. It can be abbreviated as two periods (`..`). diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding-sibling/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding-sibling/index.md index 0faf074cd72b121..7ee550b89c29343 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding-sibling/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding-sibling/index.md @@ -3,4 +3,6 @@ title: preceding-sibling slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/preceding-sibling --- +{{XsltSidebar}} + The preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding/index.md index 30968a2f1e14281..4064b3a2b5a275e 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/preceding/index.md @@ -3,4 +3,6 @@ title: preceding slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/preceding --- +{{XsltSidebar}} + The preceding axis indicates all the nodes that precede the context node in the document except any ancestor, attribute, and namespace nodes. diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/self/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/self/index.md index 08bd13312d0070c..18c3d193a958453 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/self/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/axes/self/index.md @@ -3,4 +3,6 @@ title: self slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference/Axes/self --- +{{XsltSidebar}} + The self axis indicates the context node itself. It can be abbreviated as a single period (`.`). diff --git a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/index.md b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/index.md index 8ca3e9038141d13..57c067d2c66c428 100644 --- a/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/index.md +++ b/files/en-us/web/xslt/transforming_xml_with_xslt/the_netscape_xslt_xpath_reference/index.md @@ -3,6 +3,8 @@ title: The Netscape XSLT/XPath Reference slug: Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference --- +{{XsltSidebar}} + The following is an alphabetized and annotated list of the elements, axes, and functions from the W3C's 1.0 Recommendation for XSLT, as well as from the appropriate sections of the XPath Recommendation. Development of the XSLT processor is ongoing, and this document will be updated as functionality is expanded. ### Elements diff --git a/files/en-us/web/xslt/using_the_mozilla_javascript_interface_to_xsl_transformations/index.md b/files/en-us/web/xslt/using_the_mozilla_javascript_interface_to_xsl_transformations/index.md index dd41f673c4b30cb..562cef3b0450cc3 100644 --- a/files/en-us/web/xslt/using_the_mozilla_javascript_interface_to_xsl_transformations/index.md +++ b/files/en-us/web/xslt/using_the_mozilla_javascript_interface_to_xsl_transformations/index.md @@ -3,6 +3,8 @@ title: Using the Mozilla JavaScript interface to XSL Transformations slug: Web/XSLT/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations --- +{{XsltSidebar}} + This document describes the JavaScript interface in Mozilla 1.2 and up to the XSLT Processing Engine (TransforMiiX). ### Creating an XSLTProcessor diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/advanced_example/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/advanced_example/index.md index 9c83c8ac6535e67..4b6390ec0e29bfe 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/advanced_example/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/advanced_example/index.md @@ -3,6 +3,8 @@ title: Advanced example slug: Web/XSLT/XSLT_JS_interface_in_Gecko/Advanced_Example --- +{{XsltSidebar}} + ## Advanced example This advanced example sorts several divs based on their content. The example allows sorting the content multiple times, alternating between ascending and descending order. The JavaScript loads the .xsl file only on the first sort and sets the `xslloaded` variable to true once it has finished loading the file. Using the {{domxref("XSLTProcessor.getParameter()")}} method, the code can figure whether to sort in ascending or descending order. It defaults to ascending if the parameter is empty (the first time the sorting happens, as there is no value for it in the XSLT file). The sorting value is set using {{domxref("XSLTProcessor.setParameter()")}}. diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/basic_example/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/basic_example/index.md index fb71485aa075cd7..025df9fd56e32cf 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/basic_example/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/basic_example/index.md @@ -3,6 +3,8 @@ title: Basic example slug: Web/XSLT/XSLT_JS_interface_in_Gecko/Basic_Example --- +{{XsltSidebar}} + ## Basic Example The basic example will load an XML file and apply a XSL transformation on it. These are the same files used in the [Generating HTML](/en-US/docs/Web/API/XSLTProcessor/Generating_HTML) example in the [XSLT in Netscape Gecko](/en-US/docs/Web/API/XSLTProcessor) article. The XML file describes an article and the XSL file formats the information for display. diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/index.md index 9deb6503e80ae7f..3e82f531a44d8b2 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/index.md @@ -3,6 +3,8 @@ title: The XSLT/JavaScript Interface in Gecko slug: Web/XSLT/XSLT_JS_interface_in_Gecko --- +{{XsltSidebar}} + 1. [Introduction](/en-US/docs/Web/XSLT/XSLT_JS_interface_in_Gecko/Introduction) 2. [JavaScript/XSLT Bindings](/en-US/docs/Web/XSLT/XSLT_JS_interface_in_Gecko/JavaScript_XSLT_Bindings) 3. [Basic Example](/en-US/docs/Web/XSLT/XSLT_JS_interface_in_Gecko/Basic_Example) diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/interface_list/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/interface_list/index.md index 6e74e42b246e650..1abc944db6c0dd9 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/interface_list/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/interface_list/index.md @@ -3,6 +3,8 @@ title: Interface list slug: Web/XSLT/XSLT_JS_interface_in_Gecko/Interface_List --- +{{XsltSidebar}} + ## Interface List See {{domxref("XSLTProcessor")}} in the Web API documentation section. diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/introduction/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/introduction/index.md index 7311a9a542c058b..968e9447aed62e2 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/introduction/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/introduction/index.md @@ -3,6 +3,8 @@ title: Introduction slug: Web/XSLT/XSLT_JS_interface_in_Gecko/Introduction --- +{{XsltSidebar}} + With modern browsers supporting [XSLT](/en-US/docs/Web/API/XSLTProcessor), developers can now use JavaScript to access the power that XSLT provides. JavaScript can enable a web application to load XML data, process it via XSLT into a presentable form and then add it into an existing document. Since the XML data loaded only contains the raw information without any presentation data, it can load quickly even on dialup. XSLT allows the author to directly manipulate the structure of a document. For example, it permits the rearranging and sorting of elements; it also provides more fine-grained control of the resulting document's structure. diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/javascript_xslt_bindings/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/javascript_xslt_bindings/index.md index 9226fac63eca22c..5006b8433f897a9 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/javascript_xslt_bindings/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/javascript_xslt_bindings/index.md @@ -3,6 +3,8 @@ title: JavaScript/XSLT Bindings slug: Web/XSLT/XSLT_JS_interface_in_Gecko/JavaScript_XSLT_Bindings --- +{{XsltSidebar}} + ## JavaScript/XSLT Bindings JavaScript can run XSLT transformations through the {{domxref('XSLTProcessor')}} object. Once instantiated, an {{domxref('XSLTProcessor')}} has an {{domxref('XSLTProcessor.importStylesheet()')}} method that takes as an argument the XSLT stylesheet to be used in the transformation. The stylesheet has to be passed in as an XML document, which means that the .xsl file has to be loaded by the page before calling {{domxref('XSLTProcessor.importStylesheet()')}}. This can be done via {{domxref('XMLHttpRequest')}} or {{domxref('XMLDocument.load()')}}. diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/resources/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/resources/index.md index adeef07066eef04..4221447408c3d74 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/resources/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/resources/index.md @@ -3,6 +3,8 @@ title: Resources slug: Web/XSLT/XSLT_JS_interface_in_Gecko/Resources --- +{{XsltSidebar}} + ## Resources - [Using the Mozilla JavaScript interface to XSL Transformations](/en-US/docs/Web/XSLT/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations) diff --git a/files/en-us/web/xslt/xslt_js_interface_in_gecko/setting_parameters/index.md b/files/en-us/web/xslt/xslt_js_interface_in_gecko/setting_parameters/index.md index c1c30c80711b550..e87e055162d5593 100644 --- a/files/en-us/web/xslt/xslt_js_interface_in_gecko/setting_parameters/index.md +++ b/files/en-us/web/xslt/xslt_js_interface_in_gecko/setting_parameters/index.md @@ -3,6 +3,8 @@ title: Setting parameters slug: Web/XSLT/XSLT_JS_interface_in_Gecko/Setting_Parameters --- +{{XsltSidebar}} + ## Setting Parameters While running transformations using precoded .xsl and .xml files is quite useful, configuring the .xsl file from JavaScript may be even more useful. For example, JavaScript and XSLT could be used to sort XML data and then display it. The sorting would have to alternate between ascending and descending sorting.