public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { if (prefix == null || prefix.length() == 0 || prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { writeDefaultNamespace(nsURI); return; } // No need to set mAnyOutput, and shouldn't close the element. // But element needs to be open, obviously. if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 05-Feb-2005, TSa: Also, as per namespace specs; the 'empty' * namespace URI can not be bound as a non-default namespace * (ie. for any actual prefix) */ /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though, * so for xml 1.1 documents we need to allow it */ if (!mXml11) { if (nsURI.length() == 0) { throwOutputError(ErrorConsts.ERR_NS_EMPTY); } // 01-Apr-2005, TSa: Can we (and do we want to) verify NS consistency? } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); }
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { if (prefix == null || prefix.length() == 0 || prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { writeDefaultNamespace(nsURI); return; } // No need to set mAnyOutput, and shouldn't close the element. // But element needs to be open, obviously. if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 05-Feb-2005, TSa: Also, as per namespace specs; the 'empty' * namespace URI can not be bound as a non-default namespace * (ie. for any actual prefix) */ /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though, * so for xml 1.1 documents we need to allow it */ if (!mXml11) { if (nsURI.length() == 0) { throwOutputError(ErrorConsts.ERR_NS_EMPTY); } // 01-Apr-2005, TSa: Can we (and do we want to) verify NS consistency? } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); }
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { if (prefix == null || prefix.length() == 0 || prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { writeDefaultNamespace(nsURI); return; } // No need to set mAnyOutput, and shouldn't close the element. // But element needs to be open, obviously. if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 05-Feb-2005, TSa: Also, as per namespace specs; the 'empty' * namespace URI can not be bound as a non-default namespace * (ie. for any actual prefix) */ /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though, * so for xml 1.1 documents we need to allow it */ if (!mXml11) { if (nsURI.length() == 0) { throwOutputError(ErrorConsts.ERR_NS_EMPTY); } // 01-Apr-2005, TSa: Can we (and do we want to) verify NS consistency? } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); }
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { if (prefix == null || prefix.length() == 0 || prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { writeDefaultNamespace(nsURI); return; } // No need to set mAnyOutput, and shouldn't close the element. // But element needs to be open, obviously. if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 05-Feb-2005, TSa: Also, as per namespace specs; the 'empty' * namespace URI can not be bound as a non-default namespace * (ie. for any actual prefix) */ /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though, * so for xml 1.1 documents we need to allow it */ if (!mXml11) { if (nsURI.length() == 0) { throwOutputError(ErrorConsts.ERR_NS_EMPTY); } // 01-Apr-2005, TSa: Can we (and do we want to) verify NS consistency? } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); }
doWriteNamespace(prefix, nsURI);
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException { if (prefix == null || prefix.length() == 0 || prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { writeDefaultNamespace(nsURI); return; } // No need to set mAnyOutput, and shouldn't close the element. // But element needs to be open, obviously. if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* 05-Feb-2005, TSa: Also, as per namespace specs; the 'empty' * namespace URI can not be bound as a non-default namespace * (ie. for any actual prefix) */ /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though, * so for xml 1.1 documents we need to allow it */ if (!mXml11) { if (nsURI.length() == 0) { throwOutputError(ErrorConsts.ERR_NS_EMPTY); } // 01-Apr-2005, TSa: Can we (and do we want to) verify NS consistency? } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setPrefix(prefix, nsURI); doWriteNamespace(prefix, nsURI); }
doWriteNamespace(prefix, nsURI);
doWriteNamespace(prefix, nsURI);