? build ? build.diff ? dist ? lib ? svgdiff.diff ? ecmascript/old_DOMTestCase.js ? tests/level1/core/dom1.dtd ? tests/level1/core/files/hc_staff.dtd.svg ? tests/level1/core/files/hc_staff.svg ? tests/level1/html/dom1.dtd ? tests/level3/xpath/schemavalid.diff ? tests/submittedtests/netscapeHTML/dom1.dtd ? transforms/dom-to-xsd.diff Index: build.xml =================================================================== RCS file: /sources/public/2001/DOM-Test-Suite/build.xml,v retrieving revision 1.91 diff -u -r1.91 build.xml --- build.xml 17 Apr 2003 04:22:01 -0000 1.91 +++ build.xml 23 Apr 2003 04:39:22 -0000 @@ -1010,6 +1010,9 @@ + @@ -1021,7 +1024,7 @@ - + Index: ecmascript/DOMTestCase.js =================================================================== RCS file: /sources/public/2001/DOM-Test-Suite/ecmascript/DOMTestCase.js,v retrieving revision 1.19 diff -u -r1.19 DOMTestCase.js --- ecmascript/DOMTestCase.js 17 Mar 2003 06:58:32 -0000 1.19 +++ ecmascript/DOMTestCase.js 23 Apr 2003 04:39:23 -0000 @@ -234,11 +234,17 @@ IFrameBuilder.prototype.toAutoCase = function(s) { - return s.toUpperCase(); + if (this.contentType == "text/html") { + return s.toUpperCase(); + } + return s; } IFrameBuilder.prototype.toAutoCaseArray = function(s) { - return toUpperCaseArray(s); + if (this.contentType == "text/html") { + return toUpperCaseArray(s); + } + return s; } IFrameBuilder.prototype.setImplementationAttribute = function(attribute, value) { @@ -249,6 +255,123 @@ } +function SVGPluginBuilder() { + this.contentType = "image/svg+xml"; + this.supportedContentTypes = [ "image/svg+xml" ]; + + this.supportsAsyncChange = false; + this.async = true; + this.fixedAttributeNames = [ + "validating", "expandEntityReferences", "coalescing", + "signed", "hasNullString", "ignoringElementContentWhitespace", "namespaceAware" ]; + + this.fixedAttributeValues = [false, true, false, true, true , false, false ]; + this.configurableAttributeNames = [ ]; + this.configurableAttributeValues = [ ]; + this.exception = null; +} + +SVGPluginBuilder.prototype.hasFeature = function(feature, version) { + if (feature == "XML") { + if (version == null || version == "1.0" || version == "2.0") { + return true; + } + } +} + +var svgloadcount = 0; +function SVGPluginBuilder_pollreadystate() { + var newCount = 0; + var child = document.documentElement.firstChild; + while(child != null) { + if (child.nodeName != null && child.nodeName.toUpperCase() == "BODY") { + var grand = child.firstChild; + while (grand != null) { + if (grand.nodeName.toUpperCase() == 'EMBED' && grand.readystate == 4) { + newCount++; + } + grand = grand.nextSibling; + } + break; + } + child = child.nextSibling; + } + if (newCount > svgloadcount) { + svgloadcount++; + loadComplete(); + if (setUpPageStatus == 'complete') { + return; + } + } + setTimeout(SVGPluginBuilder_pollreadystate, 100); +} + +SVGPluginBuilder.prototype.preload = function(frame, varname, url) { + var embed = document.createElement("embed"); + embed.src = fileBase + url + getSuffix(this.contentType); + embed.height = 100; + embed.width = 100; + embed.type = "image/svg+xml"; + embed.id = varname; + var child = document.documentElement.firstChild; + while(child != null) { + if (child.nodeName != null && child.nodeName.toUpperCase() == "BODY") { + child.appendChild(embed); + break; + } + child = child.nextSibling; + } + // + // if unable to monitor ready state change then + // check if load is complete every in 0.1 second + setTimeout(SVGPluginBuilder_pollreadystate , 100); + return 0; +} + +SVGPluginBuilder.prototype.load = function(frame, varname, url) { + var child = document.documentElement.firstChild; + while(child != null) { + if (child.nodeName != null && child.nodeName.toUpperCase() == "BODY") { + var grand = child.firstChild; + while (grand != null) { + if (grand.id == varname) { + return grand.getSVGDocument(); + } + grand = grand.nextSibling; + } + } + child = child.nextSibling; + } + return null; +} + +SVGPluginBuilder.prototype.getImplementationAttribute = function(attr) { + for (var i = 0; i < this.fixedAttributeNames.length; i++) { + if (this.fixedAttributeNames[i] == attr) { + return this.fixedAttributeValues[i]; + } + } + throw "Unrecognized implementation attribute: " + attr; +} + + +SVGPluginBuilder.prototype.toAutoCase = function(s) { + return s; +} + +SVGPluginBuilder.prototype.toAutoCaseArray = function(s) { + return s; +} + +SVGPluginBuilder.prototype.setImplementationAttribute = function(attribute, value) { + var supported = this.getImplementationAttribute(attribute); + if (supported != value) { + throw "SVG Plugin loader does not support " + attribute + "=" + value; + } +} + + + function MSXMLBuilder(progID) { this.progID = progID; this.configurableAttributeNames = [ @@ -460,9 +583,8 @@ case "mozilla": return new MozillaXMLBuilder(); - case "adobeSVG": -// return new AdobeSVGBuilder(); - return new IFrameBuilder(); + case "svgplugin": + return new SVGPluginBuilder(); case "dom3ls": // return new DOM3LSBuilder(); @@ -575,5 +697,7 @@ if (fileBase.indexOf('?') != -1) { fileBase = fileBase.substring(0, fileBase.indexOf('?')); } -var fileBase = fileBase.substring(0, fileBase.lastIndexOf('/') + 1) + "files/"; +fileBase = fileBase.substring(0, fileBase.lastIndexOf('/') + 1) + "files/"; + + Index: transforms/test-to-jsunit.xsl =================================================================== RCS file: /sources/public/2001/DOM-Test-Suite/transforms/test-to-jsunit.xsl,v retrieving revision 1.10 diff -u -r1.10 test-to-jsunit.xsl --- transforms/test-to-jsunit.xsl 17 Mar 2003 06:58:08 -0000 1.10 +++ transforms/test-to-jsunit.xsl 23 Apr 2003 04:39:31 -0000 @@ -51,7 +51,6 @@ return ['']; } -var fileBase = "files/"; var docsLoaded = -1000000; var setUpException = null; @@ -209,7 +208,7 @@ Mozilla XML MSXML 3.0 MSXML 4.0 - Adobe SVG + SVG Plugin