/** * Returns a SAX source. * * @return A SAX source. * @throws IOException */ public SAXSource getSaxSource() throws IOException { return getSaxSource(this); }
/** * Returns a SAX source. * * @return A SAX source. * @throws IOException */ public javax.xml.transform.sax.SAXSource getSaxSource() throws IOException { return getSaxSource(this); }
/** * Validates the XML representation against a given schema. * * @param schema * The XML schema to use. * @param result * The Result object that receives (possibly augmented) XML. */ public void validate(Schema schema, Result result) throws Exception { schema.newValidator().validate(getSaxSource(), result); }
/** * Validates the XML representation against a given schema. * * @param schema * The XML schema to use. * @param result * The Result object that receives (possibly augmented) XML. */ public void validate(javax.xml.validation.Schema schema, javax.xml.transform.Result result) throws Exception { schema.newValidator().validate(getSaxSource(), result); }
/** * Constructor. * * @param xmlRepresentation * A source XML representation to parse. * @throws IOException */ public SaxRepresentation(Representation xmlRepresentation) { super((xmlRepresentation == null) ? null : xmlRepresentation .getMediaType()); try { if (xmlRepresentation instanceof XmlRepresentation) { this.source = ((XmlRepresentation) xmlRepresentation) .getSaxSource(); } else { this.source = new SAXSource(new InputSource(xmlRepresentation .getStream())); } if (xmlRepresentation.getIdentifier() != null) { this.source.setSystemId(xmlRepresentation.getIdentifier() .getTargetRef().toString()); } } catch (IOException ioe) { ioe.printStackTrace(); } }
result = ((XmlRepresentation) representation).getSaxSource(); } else if (representation instanceof TransformRepresentation) { final TransformRepresentation source = (TransformRepresentation) representation;
if (xmlRepresentation instanceof XmlRepresentation) { this.source = ((XmlRepresentation) xmlRepresentation) .getSaxSource(); } else { try {
setSaxSource(XmlRepresentation.getSaxSource(this)); InputRepresentation xslRep = new InputRepresentation( wadl2htmlXsltUrl.openStream(),
.getSaxSource(); } else if (getSourceRepresentation() instanceof TransformRepresentation) { final TransformRepresentation lastTR = (TransformRepresentation) getSourceRepresentation(); if (rootTR.getSourceRepresentation() instanceof XmlRepresentation) { rootSource = ((XmlRepresentation) rootTR .getSourceRepresentation()).getSaxSource() .getInputSource(); } else {