<child1>1st child</child1>
<pet></pet>
<child2>2nd child</child2>
That's a really bad XML document design - never try to capture an attribute of an object as part of its name. It should be <child sequence="1">1st child</child>. If you have to transform this nonsense into something better, use match="*[starts-with(local-name(), 'child')]"
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference