On 6 Sep 2005, at 10:14, Andreas Hartmann wrote:
Pier Fumagalli wrote:[...] > It's in Subversion right now... 2.1.x branch, "validation" block. I tried it, it works nicely - thanks a lot!Unfortunately we need an isolated valdiation service (not a transformer),which I created using your code - mostly using copy & paste :( Would you be interested in decoupling the validation functionality(incl. protocol-based entity resolving) from the transformation functionality?
So, a some sort of validation component that can be looked up using the ServiceManager? Something along the lines of....
public interface Validator() {
public static final String ROLE =
"org.apache.cocoon.components.validation.Validator";
public XMLConsumer getValidator(String schemaURI);
}
public class JingValidator implements Validator {
...
}
public class JingTransformer extends ServiceableTransformer {
private Validator validator = null;
public void service(ServiceManager manager) {
super.service(manager);
manager.lookup(Validator.ROLE);
}
...
}
Is that what you're thinking of?
Pier
smime.p7s
Description: S/MIME cryptographic signature
