Re: Still trying to validate an XML Schema

Ted Hickox <[email protected]> Sun, 23 Jun 2024 10:39:01 -0500
Newsgroups gmane.text.xml.exist
Message-ID <CAAsp6CYHaxnYz2WSL+OOYrzqEA7=o_9Po4FiU7U4ewd_8XPT6w@mail.gmail.com>
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  All
I saw when I did this is

[image: 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",
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.



On Sat, Jun 22, 2024 at 1:04 PM Joe Wicentowski <[email protected]> wrote:

> Hi Ted,
>
> You can generally ignore that message and dismiss the dialog by selecting
> the OK button. The only reason to clear your cache would be - as stated in
> the dialog - "if you experience any display issues."
>
> Joe
>
> On Sat, Jun 22, 2024 at 5:41 AM Ted Hickox <[email protected]> wrote:
>
>> if I owned a filesystem and a simple webservice, then I would do that.
>> But I don't have such things.  All I have is a simple computer and I'm just
>> someone who experiments with this software at home.  I try to tutor people
>> on social media.
>>
>>
>> When I try to open eXide, it shows me an error message.  It says it seem
>> that another version of eXide has been used from this browser before.  If
>> you experience any display issues, please clear your browser's cache.  If I
>> clear my browser's cache, I will clear a lot of things I don't want to
>> destroy.  Is there some workaround for this?
>>
>> ---------- Forwarded message ---------
>> From: Claudius Teodorescu <[email protected]>
>> Date: Sat, Jun 22, 2024, 3:08 AM
>> Subject: Re: [Exist-open] Still trying to validate an XML Schema
>> To: Ted Hickox <[email protected]>
>>
>>
>> What about testing with those files stored in a filesystem and served by
>> a simple webserver?
>>
>> On Fri, 21 Jun 2024, 23:13 Ted Hickox, <[email protected]> wrote:
>>
>>> Thanks for the information but I don't think it will help in this case.
>>> Every time I open the eXide program, I open SVG_Ellipse.js.  I look at the
>>> file type in the box on the upper right corner of the screen and it insists
>>> that the file is an Xquery.  When I adjust it to javascript, I get an
>>> assignment in conditional expression error.
>>>
>>> A similar thing happens when I open the SVG_Ellipse.html file.  The file
>>> type insists that the file is an XML document when in reality it's a HTML
>>> document.  And I can't seem to change those documents permanently.  Why
>>> does this keep happening?
>>>
>>> On Fri, Jun 21, 2024 at 3:00 PM Claudius Teodorescu <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Maybe it would be useful to use fetch() instead of XMLHttpRequest, and
>>>> DOMParser to parse the SVG and extract data easily.
>>>>
>>>> Claudius
>>>>
>>>> https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
>>>>
>>>> https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
>>>>
>>>>
>>>> On Fri, 21 Jun 2024, 22:39 Ted Hickox, <[email protected]> wrote:
>>>>
>>>>> Good afternoon.  I finally took a better look at my code and noticed
>>>>> that my file had been saved as an Xquery instead of a Javascript file.  So
>>>>> I copied and pasted my text to a new file.  I destroyed the old file and
>>>>> renamed the new file.  That took care of the previous error.  Now I have a
>>>>> different error.  It's called an assignment in a conditional error.  Here
>>>>> is the code again if you need to see it.
>>>>>
>>>>> 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();
>>>>>
>>>>> On Thu, Jun 20, 2024 at 7:52 PM Ted Hickox <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> I wasn't aware that the eXist database had the arrow on the bottom of
>>>>>> the screen.  I clicked the arrow and the schema for my HTML page appeared.
>>>>>> But I also discovered another error in my code.  This involves the
>>>>>> javascript document that my HTML document references in my script tag.
>>>>>>
>>>>>> The error states that I have an unexpected token and it refers to my
>>>>>> SVG_Data variable.  I have no idea what a token is or why SVG_Data was
>>>>>> considered a token.  Here 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();
>>>>>>
>>>>>> I'm presuming that my SVG_Data becomes an object and that a new
>>>>>> XMLHTTPRequest is stored in this object.  Or is it that when the variable
>>>>>> SVG_Data is equalled to the new XMLHTTPRequest that the variable just
>>>>>> becomes an programming object.  I don't seem to have a full grasp on the
>>>>>> Document Object Model.  But I'm trying to grasp this concept as fast as I
>>>>>> can.
>>>>>>
>>>>>> On Thu, Jun 20, 2024 at 10:57 AM Florian Schmitt <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Ted,
>>>>>>>
>>>>>>> i assume "*open in the eXist database*" means to open the file in
>>>>>>> *eXide*. If yes, then check the file type in the upper right
>>>>>>> corner. If it's HTML, you can't "run" or "eval" it in eXide:
>>>>>>>
>>>>>>>
>>>>>>> Changing the file type to "xquery" should at least enable the "eval"
>>>>>>> button.
>>>>>>>
>>>>>>> For static HTML files (as in your case), you can use the arrow
>>>>>>> symbol in the lower left corner of the code area to open the file in a new
>>>>>>> browser tab:
>>>>>>>
>>>>>>>
>>>>>>> Greetings,
>>>>>>> Florian
>>>>>>>
>>>>>>>
>>>>>>> Am 20.06.24 um 01:40 schrieb Ted Hickox:
>>>>>>>
>>>>>>> I adjusted my code and my project finally worked.  My HTML document
>>>>>>> was properly validated by my schema.  But I have a new problem.  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>
>>>>>>>
>>>>>>> When I open this in the eXist database, the run button is grayed
>>>>>>> out.  Is there something wrong with my code?
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Exist-open mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>>>>>>
>>>>>> _______________________________________________
>>>>> Exist-open mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>>>>
>>>> _______________________________________________
>> Exist-open mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>

_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open
HRT45GGyDfYnMYpj.png (image/png, 7.5 KB) - not displayed
Sacr7cKlCMr7FdUC.png (image/png, 4.7 KB) - not displayed
image.png (image/png, 176.1 KB) - not displayed