private HashMap userAttributes = null;
//Emitter handler = null;
public void prepareAttributes() throws TransformerConfigurationException {
AttributeCollection atts = getAttributeList();
String nameAtt = null;
for (int a=0; a<atts.getLength(); a++) {
int nc = atts.getNameCode(a);
String f = getNamePool().getClarkName(nc);
if (f==StandardNames.NAME) {
nameAtt = atts.getValue(a).trim();
} else if (f==StandardNames.METHOD) {
method = atts.getValue(a).trim();
} else if (f==StandardNames.VERSION) {
version = atts.getValue(a).trim();
} else if (f==StandardNames.ENCODING) {
encoding = atts.getValue(a).trim();
} else if (f==StandardNames.OMIT_XML_DECLARATION) {
omitDeclaration = atts.getValue(a).trim();
} else if (f==StandardNames.STANDALONE) {
standalone = atts.getValue(a).trim();
} else if (f==StandardNames.DOCTYPE_PUBLIC) {
doctypePublic = atts.getValue(a).trim();
} else if (f==StandardNames.DOCTYPE_SYSTEM) {
doctypeSystem = atts.getValue(a).trim();
} else if (f==StandardNames.CDATA_SECTION_ELEMENTS) {
cdataElements = atts.getValue(a);
} else if (f==StandardNames.INDENT) {
indent = atts.getValue(a).trim();
} else if (f==StandardNames.MEDIA_TYPE) {
mediaType = atts.getValue(a).trim();
} else if (f==StandardNames.INCLUDE_CONTENT_TYPE) {
includeContentType = atts.getValue(a).trim();
} else if (f==StandardNames.ESCAPE_URI_ATTRIBUTES) {
escapeURIAttributes = atts.getValue(a).trim();
} else if (f==StandardNames.USE_CHARACTER_MAPS) {
useCharacterMaps = atts.getValue(a);
} else if (f==StandardNames.UNDECLARE_NAMESPACES) {
undeclareNamespaces = atts.getValue(a);
} else if (f==StandardNames.SAXON_CHARACTER_REPRESENTATION) {
representation = atts.getValue(a).trim();
} else if (f==StandardNames.SAXON_INDENT_SPACES) {
indentSpaces = atts.getValue(a).trim();
} else if (f==StandardNames.SAXON_NEXT_IN_CHAIN) {
nextInChain = atts.getValue(a).trim();
} else if (f==StandardNames.SAXON_BYTE_ORDER_MARK) {
byteOrderMark = atts.getValue(a).trim();
} else if (f==StandardNames.SAXON_REQUIRE_WELL_FORMED) {
requireWellFormed = atts.getValue(a).trim();
} else {
String attributeURI = getNamePool().getURI(nc);
if ("".equals(attributeURI) ||
NamespaceConstant.XSLT.equals(attributeURI) ||
NamespaceConstant.SAXON.equals(attributeURI)) {
checkUnknownAttribute(nc);
} else {
String name = '{' + attributeURI + '}' + atts.getLocalName(a);
if (userAttributes==null) {
userAttributes = new HashMap(5);
}
userAttributes.put(name, atts.getValue(a));
}
}
}
if (nameAtt!=null) {
try {