/** * Reset this object to write to the specified output. * * @param schemaLocation * if non-null, this value is printed on the root element as xsi:schemaLocation * @param noNsSchemaLocation * Similar to 'schemaLocation' but this one works for xsi:noNamespaceSchemaLocation */ public void startDocument(XmlOutput out,boolean fragment,String schemaLocation,String noNsSchemaLocation) throws IOException, SAXException, XMLStreamException { pushCoordinator(); nsContext.reset(); nse = nsContext.getCurrent(); if(attachmentMarshaller!=null && attachmentMarshaller.isXOPPackage()) out = new MTOMXmlOutput(out); this.out = out; objectsWithId.clear(); idReferencedObjects.clear(); textHasAlreadyPrinted = false; seenRoot = false; this.schemaLocation = schemaLocation; this.noNsSchemaLocation = noNsSchemaLocation; this.fragment = fragment; this.inlineBinaryFlag = false; this.expectedMimeType = null; cycleDetectionStack.reset(); out.startDocument(this,fragment,knownUri2prefixIndexMap,nsContext); }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
/** * Reset this object to write to the specified output. * * @param schemaLocation * if non-null, this value is printed on the root element as xsi:schemaLocation * @param noNsSchemaLocation * Similar to 'schemaLocation' but this one works for xsi:noNamespaceSchemaLocation */ public void startDocument(XmlOutput out,boolean fragment,String schemaLocation,String noNsSchemaLocation) throws IOException, SAXException, XMLStreamException { pushCoordinator(); nsContext.reset(); nse = nsContext.getCurrent(); if(attachmentMarshaller!=null && attachmentMarshaller.isXOPPackage()) out = new MTOMXmlOutput(out); this.out = out; objectsWithId.clear(); idReferencedObjects.clear(); textHasAlreadyPrinted = false; seenRoot = false; this.schemaLocation = schemaLocation; this.noNsSchemaLocation = noNsSchemaLocation; this.fragment = fragment; this.inlineBinaryFlag = false; this.expectedMimeType = null; cycleDetectionStack.reset(); out.startDocument(this,fragment,knownUri2prefixIndexMap,nsContext); }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
/** * Reset this object to write to the specified output. * * @param schemaLocation * if non-null, this value is printed on the root element as xsi:schemaLocation * @param noNsSchemaLocation * Similar to 'schemaLocation' but this one works for xsi:noNamespaceSchemaLocation */ public void startDocument(XmlOutput out,boolean fragment,String schemaLocation,String noNsSchemaLocation) throws IOException, SAXException, XMLStreamException { pushCoordinator(); nsContext.reset(); nse = nsContext.getCurrent(); if(attachmentMarshaller!=null && attachmentMarshaller.isXOPPackage()) out = new MTOMXmlOutput(out); this.out = out; objectsWithId.clear(); idReferencedObjects.clear(); textHasAlreadyPrinted = false; seenRoot = false; this.schemaLocation = schemaLocation; this.noNsSchemaLocation = noNsSchemaLocation; this.fragment = fragment; this.inlineBinaryFlag = false; this.expectedMimeType = null; cycleDetectionStack.reset(); out.startDocument(this,fragment,knownUri2prefixIndexMap,nsContext); }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
/** * Reset this object to write to the specified output. * * @param schemaLocation * if non-null, this value is printed on the root element as xsi:schemaLocation * @param noNsSchemaLocation * Similar to 'schemaLocation' but this one works for xsi:noNamespaceSchemaLocation */ public void startDocument(XmlOutput out,boolean fragment,String schemaLocation,String noNsSchemaLocation) throws IOException, SAXException, XMLStreamException { pushCoordinator(); nsContext.reset(); nse = nsContext.getCurrent(); if(attachmentMarshaller!=null && attachmentMarshaller.isXOPPackage()) out = new MTOMXmlOutput(out); this.out = out; objectsWithId.clear(); idReferencedObjects.clear(); textHasAlreadyPrinted = false; seenRoot = false; this.schemaLocation = schemaLocation; this.noNsSchemaLocation = noNsSchemaLocation; this.fragment = fragment; this.inlineBinaryFlag = false; this.expectedMimeType = null; cycleDetectionStack.reset(); out.startDocument(this,fragment,knownUri2prefixIndexMap,nsContext); }