if (type == null || (!type.equals("text/xsl"))) continue; href = XMLUtil.parseValue(xsl, "href"); if (href == null) continue; LOG.debug("stylesheet = " + href); return href;
if(type != null && (type.equals("text/xml") || type.equals("text/xsl") || type.equals("application/xslt+xml"))) { href = XMLUtil.parseValue(xsl, "href"); if (href == null) continue; LOG.debug("stylesheet = " + href); return href; }
	private String hasXSLPi(Document doc) {		NodeList docChildren = doc.getChildNodes();		Node node;		String xsl, type, href;		for (int i = 0; i < docChildren.getLength(); i++) {			node = docChildren.item(i);			if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE				&& ((ProcessingInstruction) node).getTarget().equals("xml-stylesheet")) {				// found <?xml-stylesheet?>				xsl = ((ProcessingInstruction) node).getData();				type = XMLUtil.parseValue(xsl, "type");				if (type == null || (!type.equals("text/xsl")))					continue;				href = XMLUtil.parseValue(xsl, "href");				if (href == null)					continue;				LOG.debug("stylesheet = " + href);				return href;			}		}		return null;	}