private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException { serializer.startDocument(out,fragment,getSchemaLocation(),getNoNSSchemaLocation()); if(postInitAction!=null) postInitAction.run(); if(prefixMapper!=null) { // be defensive as we work with the user's code String[] decls = prefixMapper.getContextualNamespaceDecls(); if(decls!=null) { // defensive check for( int i=0; i<decls.length; i+=2 ) { String prefix = decls[i]; String nsUri = decls[i+1]; if(nsUri!=null && prefix!=null) // defensive check serializer.addInscopeBinding(nsUri,prefix); } } } serializer.setPrefixMapper(prefixMapper); }
private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException { serializer.startDocument(out,fragment,getSchemaLocation(),getNoNSSchemaLocation()); if(postInitAction!=null) postInitAction.run(); if(prefixMapper!=null) { // be defensive as we work with the user's code String[] decls = prefixMapper.getContextualNamespaceDecls(); if(decls!=null) { // defensive check for( int i=0; i<decls.length; i+=2 ) { String prefix = decls[i]; String nsUri = decls[i+1]; if(nsUri!=null && prefix!=null) // defensive check serializer.addInscopeBinding(nsUri,prefix); } } } serializer.setPrefixMapper(prefixMapper); }
private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException { serializer.startDocument(out,fragment,getSchemaLocation(),getNoNSSchemaLocation()); if(postInitAction!=null) postInitAction.run(); if(prefixMapper!=null) { // be defensive as we work with the user's code String[] decls = prefixMapper.getContextualNamespaceDecls(); if(decls!=null) { // defensive check for( int i=0; i<decls.length; i+=2 ) { String prefix = decls[i]; String nsUri = decls[i+1]; if(nsUri!=null && prefix!=null) // defensive check serializer.addInscopeBinding(nsUri,prefix); } } } serializer.setPrefixMapper(prefixMapper); }
private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException { serializer.startDocument(out,fragment,getSchemaLocation(),getNoNSSchemaLocation()); if(postInitAction!=null) postInitAction.run(); if(prefixMapper!=null) { // be defensive as we work with the user's code String[] decls = prefixMapper.getContextualNamespaceDecls(); if(decls!=null) { // defensive check for( int i=0; i<decls.length; i+=2 ) { String prefix = decls[i]; String nsUri = decls[i+1]; if(nsUri!=null && prefix!=null) // defensive check serializer.addInscopeBinding(nsUri,prefix); } } } serializer.setPrefixMapper(prefixMapper); }