Re: Still trying to validate an XML Schema

Florian Schmitt <[email protected]> Sun, 23 Jun 2024 18:37:23 +0200
Newsgroups gmane.text.xml.exist
Message-ID <[email protected]>
Hi Ted,

you'll see the XML source in the browser because Jetty sends the file 
with content-type=application/xml. To change the content type to 
xhthml+xml (which allows the browser to render the HTML as expected), 
open the HTML file in eXide, change the content-type combobox in eXide 
in the upper right corner from XML to HTML. Don't forget to save and 
reload using CTRL+R.

The Javascript error is in fact a warning. It's triggered by line 10:

     if (SVG_Data.readyState = 4) {

I assume it should be double equation signs:

     if (SVG_Data.readyState == 4) {

With a single equation sign, you don't test for equality - instead 
you're trying to assing the value 4 to SVG_Data.readyState. That's a 
common bug so it has its own error message - doing an assignment in the 
conditional expression instead of a equation test is a bug in almost all 
cases. I assume the assignment fails, thus the bool value is false in 
every case, and the code inside the if clause is never executed.

Regarding the "windows service" issue, sadly i can't help - i don't use 
eXist on Windows.

Greetings,
Florian

Am 23.06.2024 um 17:39 schrieb Ted Hickox:
> I wanted to thank everyone here who has tried to assist me so far with 
> my eXist database problems.  I will ignore the problem of the error 
> message that displays every time I open the eXist database and I've been 
> assured that in a future upgrade of the eXist database the file type 
> mismatch will be corrected as well.  But I still have two problems.  The 
> first is that when I shut down and then restarted the eXist database, I 
> was told that it will no longer run as a windows service.  How will this 
> impact my current project.  And then I tried to use this web address to 
> display my webpage:
> 
> http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.html 
> <http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.html>  All I saw when I did this is
> 
> image.png
> 
> Furthermore, this is my javascript code:
> 
> var SVG_Data;
> var Retrieved_Data;
> var Attribute_List;
> var Coordinate_List;
> var Counter;
> function Setup() {
>       SVG_Data = new XMLHttpRequest();
>      
>   SVG_Data.open("GET","http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.xq <http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.xq>", true);
>       SVG_Data.onreadystatechange = function () {
>           if (SVG_Data.readyState = 4) {
>              Retrieved_Data = SVG_Data.responseText;
>              Retrieved_Data = Retrieved_Data.split("*");
>              Attribute_List = "";
>              Coordinate_List = "";
>              for (Counter = 0; Counter < 8; Counter++) {
>        Attribute_List = Attribute_List + Retrieved_Data[Counter] + "*";
>    Counter = Counter + 1;
>    Coordinate_List = Coordinate_List + Retrieved_Data[Counter] + "*";}
>    Attribute_List = Attribute_List.split("*");
>        Coordinate_List = Coordinate_List.split("*");
>        Coordinate = "<ellipse id = 'My_Ellipse'";
>      for (Counter = 0; Counter < 4; Counter++) {
>           Coordinate = Coordinate + " " + Attribute_List[Counter] + " = 
> '" + Coordinate_List[Counter] + "'";}
>      Coordinate = Coordinate + ">";
>       document.getElementById("Image_Box").innerHTML = Coordinate;
>           }
>       };
> }
>     SVG_Data.send();
> 
> The error states that there is an assignment in the conditional 
> expression.  I have no idea what that error means.
> *
> *
> *
> *
> 


_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open