private static Source stylesheet(final TransformerFactory factory,final Source xml) throws TransformerConfigurationException {
  final Source stylesheet=factory.getAssociatedStylesheet(xml,null,null,null);
  if (stylesheet == null) {
    throw new IllegalArgumentException("no associated stylesheet found in XML");
  }
  return stylesheet;
}

private static Source stylesheet ( final TransformerFactory factory , final Source xml ) throws TransformerConfigurationException { final Source stylesheet = factory . getAssociatedStylesheet ( xml , null , null , null ) ; if ( stylesheet == null ) { throw new IllegalArgumentException ( "no associated stylesheet found in XML" ) ; } return stylesheet ; }
retrieve a stylesheet from this xml ( throws an exception if no stylesheet is attached ) .
