ivelin 2002/06/15 22:57:42
Modified: src/java/org/apache/cocoon/components/validation/schematron
SchematronFactory.java
Log:
added inline comments how to implement is so that nested tags within an Assert
message
to be extracted instead of just the text() part.
Revision Changes Path
1.6 +14 -3
xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java
Index: SchematronFactory.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SchematronFactory.java 6 Jun 2002 14:48:25 -0000 1.5
+++ SchematronFactory.java 16 Jun 2002 05:57:42 -0000 1.6
@@ -304,6 +304,17 @@
logger.debug( "Assert diagnostics : " + assert.getDiagnostics());
jxpContext.setLenient(false);
+
+ // now read the report message
+ // @todo: The current implementation does not
+ // read xml tags used within the assert message.
+ // Solution is to use JXPath NodePointer to get
+ // to the DOM node and then convert it to a String.
+ // e.g.
+ // NodePointer nptr = (NodePointer) jxpContext.locateValue( assertPrefix );
+ // Node msgNode = (Node) nptr.getNodeValue();
+ // convery DOMNode to String
+
String message = (String) jxpContext.getValue ( assertPrefix, String.class );
assert.setMessage( message );
logger.debug( "Assert message : " + assert.getMessage());
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]