Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/org/apache/xalan/xsltc/trax/DOM2TO.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void parse(Node node)
}

// Process all non-namespace attributes next
NamespaceMappings nm = new NamespaceMappings();
NamespaceMappings nm = null;
for (int i = 0; i < length; i++) {
final Node attr = map.item(i);
final String qnameAttr = attr.getNodeName();
Expand All @@ -176,6 +176,7 @@ private void parse(Node node)
// For attributes not given an prefix explictly
// but having a namespace uri we need
// to explicitly generate the prefix
if (nm == null) nm = new NamespaceMappings();
String newPrefix = nm.lookupPrefix(uriAttr);
if (newPrefix == null)
newPrefix = nm.generateNextPrefix();
Expand Down