summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Skytt? <ville.skytta@iki.fi>2010-06-29 23:35:06 +0300
committerVille Skytt? <ville.skytta@iki.fi>2010-06-29 23:35:06 +0300
commitd3db7d381cf4245785780acf362a7614274c4a3d (patch)
tree875e2cc657491a284169c019977679dcf51f2919
parent4a3190abf2d9eb30db2fe312455e24e1b5130a8d (diff)
downloadmarkup-validator-d3db7d381cf4245785780acf362a7614274c4a3d.zip
markup-validator-d3db7d381cf4245785780acf362a7614274c4a3d.tar.gz
markup-validator-d3db7d381cf4245785780acf362a7614274c4a3d.tar.bz2
Call is_xml() less.
-rwxr-xr-xhttpd/cgi-bin/check34
1 files changed, 17 insertions, 17 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index d6f69d2..63e39c8 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -3391,25 +3391,25 @@ sub start_element
my $xmlns_value = undef;
# If in XML mode, find namespace used for each element.
- if (&W3C::Validator::MarkupValidator::is_xml($self->{_file})) {
- if (my $attr = $element->{Attributes}->{xmlns}) {
- $xmlns_value = "";
-
- # Try with SAX method
- if ($attr->{Value}) {
- $has_xmlns = TRUE;
- $xmlns_value = $attr->{Value};
- }
+ if ((my $attr = $element->{Attributes}->{xmlns}) &&
+ &W3C::Validator::MarkupValidator::is_xml($self->{_file}))
+ {
+ $xmlns_value = "";
- #next if $has_xmlns;
+ # Try with SAX method
+ if ($attr->{Value}) {
+ $has_xmlns = TRUE;
+ $xmlns_value = $attr->{Value};
+ }
- # The following is not SAX, but OpenSP specific.
- my $defaulted = $attr->{Defaulted} || '';
- if ($defaulted eq "specified") {
- $has_xmlns = TRUE;
- $xmlns_value .=
- join("", map { $_->{Data} } @{$attr->{CdataChunks}});
- }
+ #next if $has_xmlns;
+
+ # The following is not SAX, but OpenSP specific.
+ my $defaulted = $attr->{Defaulted} || '';
+ if ($defaulted eq "specified") {
+ $has_xmlns = TRUE;
+ $xmlns_value .=
+ join("", map { $_->{Data} } @{$attr->{CdataChunks}});
}
}