}
protected String getStyleSheet(final Document doc) {
String styleSheet = null;
for (final Content c : doc.getContent(new ContentFilter(ContentFilter.PI))) {
final ProcessingInstruction pi = (ProcessingInstruction) c;
if ("text/xsl".equals(pi.getPseudoAttributeValue("type"))) {
styleSheet = pi.getPseudoAttributeValue("href");
break;
}
}
return styleSheet;
}