Skip to content

Commit 2ffff6b

Browse files
committed
Update XSLT & XPath documentation (2026-11-29)
1 parent 2b66dd7 commit 2ffff6b

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎lib/docs/filters/xslt_xpath/entries.rb‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,33 @@ class EntriesFilter < Docs::EntriesFilter
44
def get_name
55
name = super
66
name.remove! 'XPath.'
7+
name.remove! 'Reference.'
8+
name.remove! 'Guides.'
79
name.remove! 'XSLT.'
810
name.remove! 'Axes.'
911
name.remove! 'Element.'
10-
name.prepend 'xsl:' if slug =~ /XSLT\/Element/
12+
name.prepend 'xsl:' if slug =~ /XSLT\/(Reference\/)?Element/
1113
name << '()' if name.gsub!('Functions.', '')
1214
name
1315
end
1416

1517
def get_type
16-
if slug =~ /XSLT\/Element/
18+
if slug =~ /XSLT\/(Reference\/)?Element/
1719
'XSLT Elements'
18-
elsif slug.start_with?('XPath/Axes')
20+
elsif slug =~ /\AXPath\/(Reference\/)?Axes/
1921
'XPath Axes'
20-
elsif slug.start_with?('XPath/Functions')
22+
elsif slug =~ /\AXPath\/(Reference\/)?Functions/
2123
'XPath Functions'
2224
else
2325
'Miscellaneous'
2426
end
2527
end
28+
29+
# The axes are documented on a single page, one <dt> per axis
30+
def additional_entries
31+
return [] unless slug =~ /\AXPath\/(Reference\/)?Axes\z/
32+
css('dt[id]').map { |node| [node['id'], node['id'], 'XPath Axes'] }
33+
end
2634
end
2735
end
2836
end

‎lib/docs/scrapers/mdn/xslt_xpath.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module Docs
22
class XsltXpath < Mdn
3-
# release = '2022-09-06'
3+
# release = '2026-11-29'
44
self.name = 'XSLT & XPath'
55
self.slug = 'xslt_xpath'
6-
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web'
6+
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/XML'
77
self.root_path = '/XSLT'
88
self.initial_paths = %w(/XPath)
99

0 commit comments

Comments
 (0)