As you may guess the real code didn't have an empty if, it's checking
for duplicated attribute names and generating an error in that case.
The whole reason for grabbing the content into a variable and then
counting attribute node names is to overcome the different
interpretation xquery and xsl have of duplicated attribute names.
Attribute nodes can come from anywhere (eg nested function calls) so I
have to do this at runtime, but since namespace declarations can only
come from statically available namespace declaration attributes in a
direct element constructor, I could put those out directly into the
containing element before grabbing the rest of the content into a
variable, which would probably be an improvement, anyway, as well as
avoiding this bug.
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit: