/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @return this returns the prefix associated with this node */ public String getPrefix() { return scope.getPrefix(reference); }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @return this returns the prefix associated with this node */ public String getPrefix() { return scope.getPrefix(reference); }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @return this returns the prefix associated with this node */ public String getPrefix() { return scope.getPrefix(reference); }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @param inherit if there is no explicit prefix then inherit * * @return this returns the prefix associated with this node */ public String getPrefix(boolean inherit) { return scope.getPrefix(reference); }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @param inherit if there is no explicit prefix then inherit * * @return this returns the prefix associated with this node */ public String getPrefix(boolean inherit) { return scope.getPrefix(reference); }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @param inherit if there is no explicit prefix then inherit * * @return this returns the prefix associated with this node */ public String getPrefix(boolean inherit) { return scope.getPrefix(reference); }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @param inherit if there is no explicit prefix then inherit * * @return this returns the prefix associated with this node */ public String getPrefix(boolean inherit) { String prefix = scope.getPrefix(reference); if(inherit) { if(prefix == null) { return parent.getPrefix(); } } return prefix; }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @param inherit if there is no explicit prefix then inherit * * @return this returns the prefix associated with this node */ public String getPrefix(boolean inherit) { String prefix = scope.getPrefix(reference); if(inherit) { if(prefix == null) { return parent.getPrefix(); } } return prefix; }
/** * This is used to acquire the prefix for this output node. If * the output node is an element then this will search its parent * nodes until the prefix that is currently in scope is found. * If however this node is an attribute then the hierarchy of * nodes is not searched as attributes to not inherit namespaces. * * @param inherit if there is no explicit prefix then inherit * * @return this returns the prefix associated with this node */ public String getPrefix(boolean inherit) { String prefix = scope.getPrefix(reference); if(inherit) { if(prefix == null) { return parent.getPrefix(); } } return prefix; }
/** * This is used to write the namespaces of the specified node to * the output. This will iterate over each namespace entered on * to the node. Once written the node is considered qualified. * * @param node this is the node to have is attributes written */ private void writeNamespaces(OutputNode node) throws Exception { NamespaceMap map = node.getNamespaces(); for(String name : map) { String prefix = map.getPrefix(name); writer.writeNamespace(name, prefix); } } }
/** * This is used to write the namespaces of the specified node to * the output. This will iterate over each namespace entered on * to the node. Once written the node is considered qualified. * * @param node this is the node to have is attributes written */ private void writeNamespaces(OutputNode node) throws Exception { NamespaceMap map = node.getNamespaces(); for(String name : map) { String prefix = map.getPrefix(name); writer.writeNamespace(name, prefix); } } }
/** * This is used to write the namespaces of the specified node to * the output. This will iterate over each namespace entered on * to the node. Once written the node is considered qualified. * * @param node this is the node to have is attributes written */ private void writeNamespaces(OutputNode node) throws Exception { NamespaceMap map = node.getNamespaces(); for(String name : map) { String prefix = map.getPrefix(name); writer.writeNamespace(name, prefix); } } }
/** * This method will resolve the prefix or the specified reference * by searching the parent nodes in order. This allows the prefix * that is currently in scope for the reference to be acquired. * * @param reference the reference to find a matching prefix for * * @return this will return the prefix that is is scope */ private String resolvePrefix(String reference) { NamespaceMap parent = source.getNamespaces(); if(parent != null) { String prefix = parent.getPrefix(reference); if(!containsValue(prefix)) { return prefix; } } return null; }
/** * This method will resolve the prefix or the specified reference * by searching the parent nodes in order. This allows the prefix * that is currently in scope for the reference to be acquired. * * @param reference the reference to find a matching prefix for * * @return this will return the prefix that is is scope */ private String resolvePrefix(String reference) { NamespaceMap parent = source.getNamespaces(); if(parent != null) { String prefix = parent.getPrefix(reference); if(!containsValue(prefix)) { return prefix; } } return null; }
/** * This method will resolve the prefix or the specified reference * by searching the parent nodes in order. This allows the prefix * that is currently in scope for the reference to be acquired. * * @param reference the reference to find a matching prefix for * * @return this will return the prefix that is is scope */ private String resolvePrefix(String reference) { NamespaceMap parent = source.getNamespaces(); if(parent != null) { String prefix = parent.getPrefix(reference); if(!containsValue(prefix)) { return prefix; } } return null; }