diff options
author | Glen Mazza <gmazza@apache.org> | 2005-06-26 15:13:38 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2005-06-26 15:13:38 +0000 |
commit | f72908d520b62288fa391c0bef76d011c919e4fe (patch) | |
tree | 3150d667f8b0a834f5c6a9377296b7e2c985c90a | |
parent | 9cdd8f0bfebfd2ac1e6e386f24cfe7d4c3ba859f (diff) | |
download | xmlgraphics-fop-f72908d520b62288fa391c0bef76d011c919e4fe.tar.gz xmlgraphics-fop-f72908d520b62288fa391c0bef76d011c919e4fe.zip |
Switch to .equals() instead of == for String compares of namespaces. Thanks to Nils Meier for the suggestion.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@201864 13f79535-47bb-0310-9956-ffa450edef68
33 files changed, 48 insertions, 48 deletions
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index f9a0ca73d..67059f481 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -365,7 +365,7 @@ public abstract class FObj extends FONode implements Constants { * @return true if a member, false if not */ protected boolean isBlockItem(String nsURI, String lName) { - return (nsURI == FO_URI && + return (FO_URI.equals(nsURI) && (lName.equals("block") || lName.equals("table") || lName.equals("table-and-caption") @@ -384,7 +384,7 @@ public abstract class FObj extends FONode implements Constants { * @return true if a member, false if not */ protected boolean isInlineItem(String nsURI, String lName) { - return (nsURI == FO_URI && + return (FO_URI.equals(nsURI) && (lName.equals("bidi-override") || lName.equals("character") || lName.equals("external-graphic") @@ -422,7 +422,7 @@ public abstract class FObj extends FONode implements Constants { * @return true if a member, false if not */ protected boolean isNeutralItem(String nsURI, String lName) { - return (nsURI == FO_URI && + return (FO_URI.equals(nsURI) && (lName.equals("multi-switch") || lName.equals("multi-properties") || lName.equals("wrapper") diff --git a/src/java/org/apache/fop/fo/XMLObj.java b/src/java/org/apache/fop/fo/XMLObj.java index 244f17a54..4dc1a40b2 100644 --- a/src/java/org/apache/fop/fo/XMLObj.java +++ b/src/java/org/apache/fop/fo/XMLObj.java @@ -61,7 +61,7 @@ public abstract class XMLObj extends FONode { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { invalidChildError(loc, nsURI, localName); } } diff --git a/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java b/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java index 34764e933..f6f7d0b37 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java +++ b/src/java/org/apache/fop/fo/flow/AbstractListItemPart.java @@ -70,7 +70,7 @@ public abstract class AbstractListItemPart extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); } diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java index 9687bfda2..6832335fc 100644 --- a/src/java/org/apache/fop/fo/flow/BasicLink.java +++ b/src/java/org/apache/fop/fo/flow/BasicLink.java @@ -106,7 +106,7 @@ public class BasicLink extends Inline { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockOrInlineItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(#PCDATA|%inline;|%block;)"); } diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java index 3f3bd4529..d184e83a5 100644 --- a/src/java/org/apache/fop/fo/flow/BidiOverride.java +++ b/src/java/org/apache/fop/fo/flow/BidiOverride.java @@ -115,7 +115,7 @@ public class BidiOverride extends FObjMixed { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockOrInlineItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(#PCDATA|%inline;|%block;)"); diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index 5c9fcc23d..3f638ae19 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.java @@ -308,12 +308,12 @@ public class Block extends FObjMixed { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockOrInlineItemFound || initialPropertySetFound) { nodesOutOfOrderError(loc, "fo:marker", "initial-property-set? (#PCDATA|%inline;|%block;)"); } - } else if (nsURI == FO_URI && localName.equals("initial-property-set")) { + } else if (FO_URI.equals(nsURI) && localName.equals("initial-property-set")) { if (initialPropertySetFound) { tooManyNodesError(loc, "fo:initial-property-set"); } else if (blockOrInlineItemFound) { diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java index 4afa50272..0a75bfc29 100644 --- a/src/java/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java @@ -118,7 +118,7 @@ public class BlockContainer extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); } diff --git a/src/java/org/apache/fop/fo/flow/Footnote.java b/src/java/org/apache/fop/fo/flow/Footnote.java index 7c7b1a8f8..20546ca27 100644 --- a/src/java/org/apache/fop/fo/flow/Footnote.java +++ b/src/java/org/apache/fop/fo/flow/Footnote.java @@ -86,11 +86,11 @@ public class Footnote extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("inline")) { + if (FO_URI.equals(nsURI) && localName.equals("inline")) { if (footnoteCitation != null) { tooManyNodesError(loc, "fo:inline"); } - } else if (nsURI == FO_URI && localName.equals("footnote-body")) { + } else if (FO_URI.equals(nsURI) && localName.equals("footnote-body")) { if (footnoteCitation == null) { nodesOutOfOrderError(loc, "fo:inline", "fo:footnote-body"); } else if (footnoteBody != null) { diff --git a/src/java/org/apache/fop/fo/flow/Inline.java b/src/java/org/apache/fop/fo/flow/Inline.java index fb62c77b2..f6e6e7176 100644 --- a/src/java/org/apache/fop/fo/flow/Inline.java +++ b/src/java/org/apache/fop/fo/flow/Inline.java @@ -130,7 +130,7 @@ public class Inline extends InlineLevel { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockOrInlineItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(#PCDATA|%inline;|%block;)"); diff --git a/src/java/org/apache/fop/fo/flow/InlineContainer.java b/src/java/org/apache/fop/fo/flow/InlineContainer.java index 985e6c508..7f53f00c0 100644 --- a/src/java/org/apache/fop/fo/flow/InlineContainer.java +++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java @@ -117,7 +117,7 @@ public class InlineContainer extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); } diff --git a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java index 716a967bd..fc6baea50 100644 --- a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java +++ b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java @@ -144,7 +144,7 @@ public class InstreamForeignObject extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { invalidChildError(loc, nsURI, localName); } else if (childNodes != null) { tooManyNodesError(loc, "child element"); diff --git a/src/java/org/apache/fop/fo/flow/ListBlock.java b/src/java/org/apache/fop/fo/flow/ListBlock.java index 070262cad..2e6d4a056 100644 --- a/src/java/org/apache/fop/fo/flow/ListBlock.java +++ b/src/java/org/apache/fop/fo/flow/ListBlock.java @@ -112,11 +112,11 @@ public class ListBlock extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (hasListItem) { nodesOutOfOrderError(loc, "fo:marker", "fo:list-item"); } - } else if (nsURI == FO_URI && localName.equals("list-item")) { + } else if (FO_URI.equals(nsURI) && localName.equals("list-item")) { hasListItem = true; } else { invalidChildError(loc, nsURI, localName); diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index 01d0c37ca..6b6b2dd0e 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -107,15 +107,15 @@ public class ListItem extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (label != null) { nodesOutOfOrderError(loc, "fo:marker", "fo:list-item-label"); } - } else if (nsURI == FO_URI && localName.equals("list-item-label")) { + } else if (FO_URI.equals(nsURI) && localName.equals("list-item-label")) { if (label != null) { tooManyNodesError(loc, "fo:list-item-label"); } - } else if (nsURI == FO_URI && localName.equals("list-item-body")) { + } else if (FO_URI.equals(nsURI) && localName.equals("list-item-body")) { if (label == null) { nodesOutOfOrderError(loc, "fo:list-item-label", "fo:list-item-body"); } else if (body != null) { diff --git a/src/java/org/apache/fop/fo/flow/MultiProperties.java b/src/java/org/apache/fop/fo/flow/MultiProperties.java index dff9da798..e87cbe0f7 100644 --- a/src/java/org/apache/fop/fo/flow/MultiProperties.java +++ b/src/java/org/apache/fop/fo/flow/MultiProperties.java @@ -87,13 +87,13 @@ public class MultiProperties extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("multi-property-set")) { + if (FO_URI.equals(nsURI) && localName.equals("multi-property-set")) { if (hasWrapper) { nodesOutOfOrderError(loc, "fo:multi-property-set", "fo:wrapper"); } else { hasMultiPropertySet = true; } - } else if (nsURI == FO_URI && localName.equals("wrapper")) { + } else if (FO_URI.equals(nsURI) && localName.equals("wrapper")) { if (hasWrapper) { tooManyNodesError(loc, "fo:wrapper"); } else { diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java index 1384be281..03aac1ca2 100644 --- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java +++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java @@ -85,7 +85,7 @@ public class MultiSwitch extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (!(nsURI == FO_URI && localName.equals("multi-case"))) { + if (!(FO_URI.equals(nsURI) && localName.equals("multi-case"))) { invalidChildError(loc, nsURI, localName); } } diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index 8ebe076e7..3d7704425 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -156,7 +156,7 @@ public class Table extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (localName.equals("marker")) { if (tableColumnFound || tableHeaderFound || tableFooterFound || tableBodyFound) { diff --git a/src/java/org/apache/fop/fo/flow/TableAndCaption.java b/src/java/org/apache/fop/fo/flow/TableAndCaption.java index 1f02f9a96..5372f5b26 100644 --- a/src/java/org/apache/fop/fo/flow/TableAndCaption.java +++ b/src/java/org/apache/fop/fo/flow/TableAndCaption.java @@ -118,13 +118,13 @@ public class TableAndCaption extends FObj { protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (tableCaptionFound) { nodesOutOfOrderError(loc, "fo:marker", "fo:table-caption"); } else if (tableFound) { nodesOutOfOrderError(loc, "fo:marker", "fo:table"); } - } else if (nsURI == FO_URI && localName.equals("table-caption")) { + } else if (FO_URI.equals(nsURI) && localName.equals("table-caption")) { if (tableCaptionFound) { tooManyNodesError(loc, "fo:table-caption"); } else if (tableFound) { @@ -132,7 +132,7 @@ public class TableAndCaption extends FObj { } else { tableCaptionFound = true; } - } else if (nsURI == FO_URI && localName.equals("table")) { + } else if (FO_URI.equals(nsURI) && localName.equals("table")) { if (tableFound) { tooManyNodesError(loc, "fo:table"); } else { diff --git a/src/java/org/apache/fop/fo/flow/TableBody.java b/src/java/org/apache/fop/fo/flow/TableBody.java index cae2fd2ce..b12b4bd08 100644 --- a/src/java/org/apache/fop/fo/flow/TableBody.java +++ b/src/java/org/apache/fop/fo/flow/TableBody.java @@ -115,7 +115,7 @@ public class TableBody extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (localName.equals("marker")) { if (tableRowsFound || tableCellsFound) { nodesOutOfOrderError(loc, "fo:marker", "(table-row+|table-cell+)"); diff --git a/src/java/org/apache/fop/fo/flow/TableCaption.java b/src/java/org/apache/fop/fo/flow/TableCaption.java index 515079ed5..f9c54236d 100644 --- a/src/java/org/apache/fop/fo/flow/TableCaption.java +++ b/src/java/org/apache/fop/fo/flow/TableCaption.java @@ -112,7 +112,7 @@ public class TableCaption extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); } diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java index dcc7a0a4c..e46f09cb0 100644 --- a/src/java/org/apache/fop/fo/flow/TableCell.java +++ b/src/java/org/apache/fop/fo/flow/TableCell.java @@ -166,7 +166,7 @@ public class TableCell extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); } diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java index 02afd2a26..222c36b12 100644 --- a/src/java/org/apache/fop/fo/flow/TableRow.java +++ b/src/java/org/apache/fop/fo/flow/TableRow.java @@ -126,7 +126,7 @@ public class TableRow extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (!(nsURI == FO_URI && localName.equals("table-cell"))) { + if (!(FO_URI.equals(nsURI) && localName.equals("table-cell"))) { invalidChildError(loc, nsURI, localName); } } diff --git a/src/java/org/apache/fop/fo/flow/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java index c8bb26f73..c1a7538fc 100644 --- a/src/java/org/apache/fop/fo/flow/Wrapper.java +++ b/src/java/org/apache/fop/fo/flow/Wrapper.java @@ -69,7 +69,7 @@ public class Wrapper extends FObjMixed { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockOrInlineItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(#PCDATA|%inline;|%block;)"); diff --git a/src/java/org/apache/fop/fo/pagination/Declarations.java b/src/java/org/apache/fop/fo/pagination/Declarations.java index b66ea253a..110f8e2a8 100644 --- a/src/java/org/apache/fop/fo/pagination/Declarations.java +++ b/src/java/org/apache/fop/fo/pagination/Declarations.java @@ -67,7 +67,7 @@ public class Declarations extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (!localName.equals("color-profile")) { invalidChildError(loc, nsURI, localName); } diff --git a/src/java/org/apache/fop/fo/pagination/Flow.java b/src/java/org/apache/fop/fo/pagination/Flow.java index 616f9409a..911b83285 100644 --- a/src/java/org/apache/fop/fo/pagination/Flow.java +++ b/src/java/org/apache/fop/fo/pagination/Flow.java @@ -97,7 +97,7 @@ public class Flow extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("marker")) { + if (FO_URI.equals(nsURI) && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); } diff --git a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java index 084fa4bec..4d8169f7a 100644 --- a/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java +++ b/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java @@ -83,7 +83,7 @@ public class LayoutMasterSet extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (!localName.equals("simple-page-master") && !localName.equals("page-sequence-master")) { invalidChildError(loc, nsURI, localName); diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java index 27a3b5b7a..8df38b6ef 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java @@ -162,7 +162,7 @@ public class PageSequence extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (localName.equals("title")) { if (titleFO != null) { tooManyNodesError(loc, "fo:title"); diff --git a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java index 32e865622..d05e785af 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java @@ -95,7 +95,7 @@ public class PageSequenceMaster extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (!localName.equals("single-page-master-reference") && !localName.equals("repeatable-page-master-reference") && !localName.equals("repeatable-page-master-alternatives")) { diff --git a/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java b/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java index edc53db05..7639d7c02 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java @@ -71,7 +71,7 @@ public class PageSequenceWrapper extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (!(nsURI == FO_URI && (localName.equals("page-sequence") || + if (!(FO_URI.equals(nsURI) && (localName.equals("page-sequence") || localName.equals("page-sequence-wrapper")))) { invalidChildError(loc, nsURI, localName); } diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java index 64288457a..52463637b 100644 --- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java +++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java @@ -93,7 +93,7 @@ public class RepeatablePageMasterAlternatives extends FObj */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (!(nsURI == FO_URI && + if (!(FO_URI.equals(nsURI) && localName.equals("conditional-page-master-reference"))) { invalidChildError(loc, nsURI, localName); } diff --git a/src/java/org/apache/fop/fo/pagination/Root.java b/src/java/org/apache/fop/fo/pagination/Root.java index f6494c0b3..4d27222de 100644 --- a/src/java/org/apache/fop/fo/pagination/Root.java +++ b/src/java/org/apache/fop/fo/pagination/Root.java @@ -93,7 +93,7 @@ public class Root extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI) { + if (FO_URI.equals(nsURI)) { if (localName.equals("layout-master-set")) { if (layoutMasterSet != null) { tooManyNodesError(loc, "fo:layout-master-set"); diff --git a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java index b704a79d2..078c88533 100644 --- a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java +++ b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java @@ -117,13 +117,13 @@ public class SimplePageMaster extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("region-body")) { + if (FO_URI.equals(nsURI) && localName.equals("region-body")) { if (hasRegionBody) { tooManyNodesError(loc, "fo:region-body"); } else { hasRegionBody = true; } - } else if (nsURI == FO_URI && localName.equals("region-before")) { + } else if (FO_URI.equals(nsURI) && localName.equals("region-before")) { if (!hasRegionBody) { nodesOutOfOrderError(loc, "fo:region-body", "fo:region-before"); } else if (hasRegionBefore) { @@ -137,7 +137,7 @@ public class SimplePageMaster extends FObj { } else { hasRegionBody = true; } - } else if (nsURI == FO_URI && localName.equals("region-after")) { + } else if (FO_URI.equals(nsURI) && localName.equals("region-after")) { if (!hasRegionBody) { nodesOutOfOrderError(loc, "fo:region-body", "fo:region-after"); } else if (hasRegionAfter) { @@ -149,7 +149,7 @@ public class SimplePageMaster extends FObj { } else { hasRegionAfter = true; } - } else if (nsURI == FO_URI && localName.equals("region-start")) { + } else if (FO_URI.equals(nsURI) && localName.equals("region-start")) { if (!hasRegionBody) { nodesOutOfOrderError(loc, "fo:region-body", "fo:region-start"); } else if (hasRegionStart) { @@ -159,7 +159,7 @@ public class SimplePageMaster extends FObj { } else { hasRegionStart = true; } - } else if (nsURI == FO_URI && localName.equals("region-end")) { + } else if (FO_URI.equals(nsURI) && localName.equals("region-end")) { if (!hasRegionBody) { nodesOutOfOrderError(loc, "fo:region-body", "fo:region-end"); } else if (hasRegionEnd) { diff --git a/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java b/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java index 40ca9836b..38c01b739 100644 --- a/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java +++ b/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java @@ -80,11 +80,11 @@ public class Bookmark extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (nsURI == FO_URI && localName.equals("bookmark-title")) { + if (FO_URI.equals(nsURI) && localName.equals("bookmark-title")) { if (bookmarkTitle != null) { tooManyNodesError(loc, "fo:bookmark-title"); } - } else if (nsURI == FO_URI && localName.equals("bookmark")) { + } else if (FO_URI.equals(nsURI) && localName.equals("bookmark")) { if (bookmarkTitle == null) { nodesOutOfOrderError(loc, "fo:bookmark-title", "fo:bookmark"); } diff --git a/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java b/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java index d13d06bd4..025e91054 100644 --- a/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java +++ b/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java @@ -71,7 +71,7 @@ public class BookmarkTree extends FObj { */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { - if (!(nsURI == FO_URI && + if (!(FO_URI.equals(nsURI) && localName.equals("bookmark"))) { invalidChildError(loc, nsURI, localName); } |