|
From: Ted H. <meg...@gm...> - 2024-06-24 00:47:11
|
I feel like such an idiot. Thanks for helping me validate my data. Since
I know my data is valid, I know that there is something wrong with my
Javascript. I'm not sure what that would be, but I will test various
things. In case anyone is curious, here is my Javascript.
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();
And here is my revised HTML
<html xmlns="http://www.w3.org/1999/xhtml" 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>
On Sun, Jun 23, 2024 at 5:57 PM Florian Schmitt <
ml-...@fl...> wrote:
> Hi Ted,
>
> taka a close look to the validation result. Instead of "ellipse",
> "Ellipse" is expected. You've defined in your schema that the element
> name starts with an upper-case "E", which isn't the case in your XML.
>
> Thus, replace
>
> <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>
>
> with
>
> <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>
>
> HTH
> Florian
>
>
> Am 23.06.2024 um 23:24 schrieb Ted Hickox:
> > Here is a little update. I attempted to validate my xml code. This is
> > the result I received:
> >
> > image.png
> >
> > I'm assuming that the problem is located in my xml code and not in my
> > xml schema. Here are my xml and xml schema codes
> ...
>
>
>
>
>
>
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
|