From: Claudius T. <cla...@gm...> - 2024-06-22 12:15:30
|
You can use GitHub Pages for this small project. You can store a static website there, which is your case with those files. On Sat, 22 Jun 2024, 12:41 Ted Hickox, <meg...@gm...> 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 <cla...@gm...> > Date: Sat, Jun 22, 2024, 3:08 AM > Subject: Re: [Exist-open] Still trying to validate an XML Schema > To: Ted Hickox <meg...@gm...> > > > 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, <meg...@gm...> 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 < >> cla...@gm...> 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, <meg...@gm...> 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 <meg...@gm...> 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 < >>>>> ml-...@fl...> 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 >>>>>> Exi...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/exist-open >>>>>> >>>>> _______________________________________________ >>>> Exist-open mailing list >>>> Exi...@li... >>>> https://lists.sourceforge.net/lists/listinfo/exist-open >>>> >>> _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |