diff --git a/basis/xml/traversal/traversal-docs.factor b/basis/xml/traversal/traversal-docs.factor
index d8032d99fc..39c3951043 100644
--- a/basis/xml/traversal/traversal-docs.factor
+++ b/basis/xml/traversal/traversal-docs.factor
@@ -67,7 +67,16 @@ HELP: tag-named
{ "name/string" "an XML name or string representing the name" }
{ "matching-tag" tag } }
{ $description "Finds the first tag with matching name which is the direct child of the given tag." }
-{ $see-also deep-tags-named deep-tag-named tags-named } ;
+{ $see-also deep-tags-named deep-tag-named tag-named-with-attr tags-named } ;
+
+HELP: tag-named-with-attr
+{ $values { "tag" "an XML tag or document" }
+ { "tag-name" "an XML name or string representing the name" }
+ { "attr-value" "a string representing the attribute value" }
+ { "attr-name" "a string representing the attribute name" }
+ { "matching-tag" tag } }
+{ $description "Finds the first tag with matching name with the corresponding attribute name and value which is the direct child of the given tag." }
+{ $see-also tag-named } ;
HELP: tags-named
{ $values { "tag" "an XML tag or document" }
diff --git a/basis/xml/traversal/traversal-tests.factor b/basis/xml/traversal/traversal-tests.factor
index c7e8c0a4ae..de04830e4a 100644
--- a/basis/xml/traversal/traversal-tests.factor
+++ b/basis/xml/traversal/traversal-tests.factor
@@ -1,6 +1,6 @@
! Copyright (C) 2005, 2009 Daniel Ehrenberg
! See http://factorcode.org/license.txt for BSD license.
-USING: xml xml.traversal tools.test xml.data sequences arrays ;
+USING: xml xml.traversal tools.test xml.data sequences arrays kernel ;
IN: xml.traversal.tests
[ "bar" ] [ "bar" string>xml children>string ] unit-test
@@ -19,3 +19,5 @@ IN: xml.traversal.tests
[ { "blah" } ] [ "" string>xml "blah" "attr" tags-with-attr [ "attr" attr ] map ] unit-test
[ { "blah" } ] [ "bar" { { "attr" "blah" } } f 1array "blah" "attr" tags-with-attr [ "attr" attr ] map ] unit-test
+
+[ { "http://hub.example.com" "http://alt.example.com" } ] [ "" string>xml-chunk "head" tag-named [ "link" "hub" "rel" tag-named-with-attr ] [ "link" "alternate" "rel" tag-named-with-attr ] bi [ "href" attr ] bi@ 2array ] unit-test
diff --git a/basis/xml/traversal/traversal.factor b/basis/xml/traversal/traversal.factor
index ce3555fe81..f5b1baf6f1 100644
--- a/basis/xml/traversal/traversal.factor
+++ b/basis/xml/traversal/traversal.factor
@@ -49,6 +49,9 @@ PRIVATE>
: tag-with-attr ( tag attr-value attr-name -- matching-tag )
assure-name '[ _ _ tag-with-attr? ] find nip ;
+: tag-named-with-attr ( tag tag-name attr-value attr-name -- matching-tag )
+ [ tags-named ] 2dip '[ _ _ tag-with-attr? ] find nip ;
+
: tags-with-attr ( tag attr-value attr-name -- tags-seq )
assure-name '[ _ _ tag-with-attr? ] { } filter-as ;