r1356 - branches/bxe_2_0/relaxng
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Wed Jul 27 12:18:28 2005
New Revision: 1356
Modified:
branches/bxe_2_0/relaxng/RelaxNG.js
Log:
fix for http://bugs.bitflux.ch/cgi-bin/bugzilla/show_bug.cgi?id=825
"no error message with a rng file without <start>"
Modified: branches/bxe_2_0/relaxng/RelaxNG.js
==============================================================================
--- branches/bxe_2_0/relaxng/RelaxNG.js (original)
+++ branches/bxe_2_0/relaxng/RelaxNG.js Wed Jul 27 12:18:28 2005
@@ -44,11 +44,15 @@
//dump(this.xmldoc.saveXML(this.xmldoc));
var rootChildren = this.xmldoc.documentElement.childNodes;
-
+ var foundStart = false;
for (var i = 0; i < rootChildren.length; i++) {
if (rootChildren[i].isRelaxNGElement("start")) {
this.parseStart(rootChildren[i]);
- }
+ foundStart = true;
+ }
+ }
+ if (!foundStart) {
+ alert("RelaxNG document doesn't have a 'start' element. Could not validate document.");
}
dump ("End parsing RNG " + (new Date() - startTimer)/1000 + " sec\n");
return true;
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs