public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (actPrefix == null || actPrefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(actPrefix, nsURI);
@Override public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
@Override public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
@Override public void writeDefaultNamespace(String nsURI) throws XMLStreamException { /* 01-Sep-2006, TSa: The use case for calling this method is that * of caller may wanting to 'suggest' that * such a namespace should indeed be bound at this level. This * may be necessary for canonicalization, or for minimizing number * of binding declarations (all children need the ns, but root * itself not). */ if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } /* ... We have one complication though: if the current element * uses default namespace, can not change it (attributes don't * matter -- they never use the default namespace, but either don't * belong to a namespace, or belong to one using explicit prefix) */ String prefix = mCurrElem.getPrefix(); if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } }
if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI);
if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI);
if (prefix != null && prefix.length() > 0) { // ok, can change it mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (prefix == null || prefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(prefix, nsURI);
if (actPrefix == null || actPrefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(actPrefix, nsURI);
if (actPrefix == null || actPrefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(actPrefix, nsURI);
if (actPrefix == null || actPrefix.length() == 0) { // def NS mCurrElem.setDefaultNsUri(nsURI); doWriteDefaultNs(nsURI); } else { // explicit NS mCurrElem.addPrefix(actPrefix, nsURI);