Skip to content

The eXist database is insisting that my Javascript code is really an Xquery code #5338

@Speedlearner5

Description

@Speedlearner5

eXist Error 1
eXist Error 2

This is my HTML code.

<html xmlns="http://www.TedTheSpeedlearner.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TedTheSpeedlearner.com SVG_Ellipse_Webpage_XML_Schema.xsd">
    <head>
        <title>SVG Ellipse</title>
        <link rel="stylesheet" type="text/css" href="http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.css"/>
        <script language="javascript" src="http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.js"/>
    </head>
    <body onload="Setup()">
        <svg id="Image_Box">
            <ellipse id="My_Ellipse"/>
        </svg>
    </body>
</html>

This is my css code

#Image_Box {
height: 500px;
width: 800px;}
#My_Ellipse {
fill: none;
stroke: blue;
stroke-width: 3;}

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", 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();

This is my XML code

<SVG_Data_Collection xmlns="http://www.TedTheSpeedlearner.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TedTheSpeedlearner.com SVG_Ellipse_Data_Schema.xsd">
    <ellipse>
        <X_Center_Coordinate>100</X_Center_Coordinate>
        <Y_Center_Coordinate>100</Y_Center_Coordinate>
        <X_Radius_Coordinate>30</X_Radius_Coordinate>
        <Y_Radius_Coordinate>70</Y_Radius_Coordinate>
    </ellipse>
</SVG_Data_Collection>

Right now I'm running Windows 11 with all updates installed. I'm also running Java 11 and the latest version of the eXist database.
eXist Monex Error

At this moment my eXist database refuses to run as a Windows service because I turned it off and tried to turn it back on. I also cleared my cache but it had no positive effect. eXist continues to insist that my javascript code is some sort of xquery code. I don't know how to fix any of this. Can anyone assist me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions