Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sidebars): Add XSLT and XPATH sidebar navigation #27328

Merged
merged 3 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions files/en-us/web/xpath/axes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ title: Axes
slug: Web/XPath/Axes
---

<section id="Quick_links">
{{ListSubpagesForSidebar("/en-US/docs/Web/XPath")}}
</section>
{{XsltSidebar}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note a problem with this PR, but FYI this does not get highlighted in sidebar, but is present

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be improved in the sidebar, yes. I'm not sure why it's not highlighted, will need investigation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess because it's a top-level list item which I don't think gets highlighted by default.


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.

Expand Down
34 changes: 1 addition & 33 deletions files/en-us/web/xpath/comparison_with_css_selectors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ title: Comparison of CSS Selectors and XPath
slug: Web/XPath/Comparison_with_CSS_selectors
---

<section id="Quick_links">
{{ListSubpagesForSidebar("/en-US/docs/Web/XPath")}}
</section>
{{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.

Expand All @@ -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 |

<section id="Quick_links">
<ol>
<li><strong><a href="/en-US/docs/Web/XSLT">XSLT</a></strong></li>
<li><strong><a href="/en-US/docs/Web/EXSLT">EXSLT</a></strong></li>
<li><strong><a href="/en-US/docs/Web/XPath">XPath</a></strong></li>
<li class="toggle">
<details open>
<summary>Guides</summary>
<ol>
<li><a href="/en-US/docs/Web/XPath/Comparison_with_CSS_selectors">Comparison of CSS Selectors and XPath</a>
</li>
<li><a href="/en-US/docs/Web/XPath/Snippets">XPath snippets</a></li>
</ol>
</details>
</li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/XPath/Axes">XPath Axes</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/XPath/Axes")}}
</details>
</li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/XPath/Functions">XPath Functions</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/XPath/Functions")}}
</details>
</li>
</ol>
</section>
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/boolean/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: boolean
slug: Web/XPath/Functions/boolean
---

{{XsltRef()}}
{{XsltSidebar}}

The `boolean` function evaluates an expression and returns true or false.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/ceiling/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/choose/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/concat/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/contains/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/count/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/current/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/document/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/false/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "false"
slug: Web/XPath/Functions/false
---

{{ XsltRef() }}
{{XsltSidebar}}

The `false` function returns boolean false.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/floor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/format-number/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/generate-id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 1 addition & 5 deletions files/en-us/web/xpath/functions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ title: Functions
slug: Web/XPath/Functions
---

<section id="Quick_links">
{{ListSubpagesForSidebar("/en-US/docs/Web/XPath")}}
</section>
{{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.

Expand Down Expand Up @@ -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")}}
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/key/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/lang/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/last/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/local-name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/namespace-uri/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/normalize-space/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/not/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/number/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/position/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/round/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/starts-with/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/string-length/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/string/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: string
slug: Web/XPath/Functions/string
---

{{ XsltRef() }}
{{XsltSidebar}}

The `string` function converts the given argument to a string.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/substring-after/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/substring/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: substring
slug: Web/XPath/Functions/substring
---

{{ XsltRef() }}
{{XsltSidebar}}

The `substring` function returns a part of a given string.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/sum/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/system-property/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/translate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/xpath/functions/true/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "true"
slug: Web/XPath/Functions/true
---

{{ XsltRef() }}
{{XsltSidebar}}

The `true` function returns a boolean value of true.

Expand Down
Loading