xmljs-users Mailing List for xml for SCRIPT (Page 7)
Brought to you by:
djoham,
witchhunter
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(9) |
Mar
(20) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(14) |
Aug
(14) |
Sep
(10) |
Oct
(5) |
Nov
(2) |
Dec
(11) |
2005 |
Jan
(12) |
Feb
(4) |
Mar
(3) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
(12) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2006 |
Jan
(2) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
(8) |
2007 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(8) |
Nov
|
Dec
(2) |
2008 |
Jan
(4) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2010 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(2) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(4) |
Jul
(5) |
Aug
(5) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(6) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
(5) |
Apr
(3) |
May
(5) |
Jun
(8) |
Jul
(3) |
Aug
(14) |
Sep
(22) |
Oct
(9) |
Nov
|
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David J. <dj...@ya...> - 2004-10-25 04:04:01
|
Hi Stepan! There isn't any way currently to do what you're doing, but my suggestion would be to do exactly what you're proposing. I think you're on the right track. Good luck! David --- Stepan Riha <xm...@no...> wrote: > Is there an easy way to compare the contents of two W3C DOMDocument objects for > equality? Right now I try to do this by comparing (doc1.toString() == > doc2.toString()), but that may return false if the order in which attributes > were added to nodes in the documents is different (even though the documents > are semantically equivalent). It would be nice if there was a compare() method > I could call on the DOMDocument or if the toString() methods would produce a > canonical form. > > I'm planning to implement the canonical toString() by changing the > DOMNamedNodeMap_toString() method to concatenate the elements sorted by their > names. This should produce the same value regardless of the order in which > elements were added to the NamedNodeMap. > > The reason I'm doing this is that in my XML editing web app, I want to warn a > user if they leave the page without having saved the changes they made. So on > page load, I capture the current XML document and in my window.onbeforeunload > handler I compare it with the current (edited) document, and if they differ, > display a warning. With the current implementation I sometimes get a warning > if the user just "clicks around" because I delete/reinsert attributes in a > different order. > > - Stepan > > -- > Stepan Riha > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: Stepan R. <xm...@no...> - 2004-10-23 02:31:12
|
Is there an easy way to compare the contents of two W3C DOMDocument objects for equality? Right now I try to do this by comparing (doc1.toString() == doc2.toString()), but that may return false if the order in which attributes were added to nodes in the documents is different (even though the documents are semantically equivalent). It would be nice if there was a compare() method I could call on the DOMDocument or if the toString() methods would produce a canonical form. I'm planning to implement the canonical toString() by changing the DOMNamedNodeMap_toString() method to concatenate the elements sorted by their names. This should produce the same value regardless of the order in which elements were added to the NamedNodeMap. The reason I'm doing this is that in my XML editing web app, I want to warn a user if they leave the page without having saved the changes they made. So on page load, I capture the current XML document and in my window.onbeforeunload handler I compare it with the current (edited) document, and if they differ, display a warning. With the current implementation I sometimes get a warning if the user just "clicks around" because I delete/reinsert attributes in a different order. - Stepan -- Stepan Riha |
From: P. <so...@si...> - 2004-09-29 07:11:51
|
Thanks James. I'll try that (first, I have to learn OO for Javascript :-)) On Thu, 23 Sep 2004 07:24:04 -0500, "James S. Elkins" <jam...@co...> said: > Soren, >=20 > I wrote a chat system awhile back using XML for Script that didn't have= =20 > this problem. Here's a general observation that applies to chat as well > as=20 > other animated client-side objects such as slideshows and scrollers. >=20 > Use object-oriented programming in your chat client. In general, I find= =20 > that the hourglass seldom appears when I use repeated calls to a > JavaScript=20 > object in a timing loop instead of ordinary function calls. Also, if you= =20 > have multiple concurrent setTimeout() and/or setInterval() calls running > in=20 > your document, create an Animator object to consolidate them. >=20 > Hope this helps. >=20 > James >=20 >=20 > At 11:03 PM 9/22/2004, you wrote: > >Send xmljs-users mailing list submissions to > > xml...@li... > > > >To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > >or, via email, send a message with subject or body 'help' to > > xml...@li... > > > >You can reach the person managing the list at > > xml...@li... > > > >When replying, please edit your Subject line so it is more specific > >than "Re: Contents of xmljs-users digest..." > > > > > >Today's Topics: > > > > 1. Pevent hourglass from showing (=3D?ISO-8859-1?Q? S=3DF8ren?=3D Pe= dersen) > > 2. Re: Pevent hourglass from showing (=3D?ISO-8859-1?Q? S=3DF8ren?= =3D Pedersen) > > 3. Re: Pevent hourglass from showing (David Joham) > > > >--__--__-- > > > >Message: 1 > >To: xml...@li... > >Date: Wed, 22 Sep 2004 08:50:56 +0200 > >From: =3D?ISO-8859-1?Q? "S=3DF8ren?=3D Pedersen" <so...@si...> > >Subject: [xmljs-users] Pevent hourglass from showing > > > >Hello > > > >I use xmljs for a chat system that loads a new xml document every 6 > >seconds or so. It works great but every time the iframe loads the > >hourglass (on the mouse pointer) shows. This is a bit annoying and I was > >wondering if there's a way to prevent this. I tried with: > > > ><body style=3D"cursor: default;"> > > > >But that doesn't seem to work. > > > >Thanks, > > > >Soren > > > > > >--__--__-- > > > >Message: 2 > >Subject: Re: [xmljs-users] Pevent hourglass from showing > >To: xml...@li... > >Date: Wed, 22 Sep 2004 11:42:57 +0200 > >From: =3D?ISO-8859-1?Q? "S=3DF8ren?=3D Pedersen" <so...@si...> > > > >Well, it does actually work in Explorer, but not in my Avant browser > >(and Mozilla). > > > > > > > >On Wed, 22 Sep 2004 08:50:56 +0200, " S=3DF8ren Pedersen" > ><so...@si...> said: > > > Hello > > >=3D20 > > > I use xmljs for a chat system that loads a new xml document every 6 > > > seconds or so. It works great but every time the iframe loads the > > > hourglass (on the mouse pointer) shows. This is a bit annoying and I = was > > > wondering if there's a way to prevent this. I tried with: > > >=3D20 > > > <body style=3D3D"cursor: default;"> > > >=3D20 > > > But that doesn't seem to work. > > >=3D20 > > > Thanks, > > >=3D20 > > > Soren > > >=3D20 > > >=3D20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > > Project Admins to receive an Apple iPod Mini FREE for your judgement = on > > > who ports your project to Linux PPC the best. Sponsored by IBM. > > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > > _______________________________________________ > > > xmljs-users mailing list > > > xml...@li... > > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > >--__--__-- > > > >Message: 3 > >Date: Wed, 22 Sep 2004 07:58:04 -0700 (PDT) > >From: David Joham <dj...@ya...> > >Subject: Re: [xmljs-users] Pevent hourglass from showing > >To: "S=F8ren" Pedersen <so...@si...>, xml...@li...urcefo= rge.net > > > > > >Hmm. Good question. Try cursor: pointer or cursor: text and see if maybe= =20 > >that works better. Other > >than that, I'm at a loss. I'll think about it some more though and if I= =20 > >come up with anything I'll > >let you know... > > > >David > > > >--- S=F8ren Pedersen <so...@si...> wrote: > > > > > Well, it does actually work in Explorer, but not in my Avant browser > > > (and Mozilla). > > > > > > > > > > > > On Wed, 22 Sep 2004 08:50:56 +0200, " S=F8ren Pedersen" > > > <so...@si...> said: > > > > Hello > > > > > > > > I use xmljs for a chat system that loads a new xml document every 6 > > > > seconds or so. It works great but every time the iframe loads the > > > > hourglass (on the mouse pointer) shows. This is a bit annoying and = I was > > > > wondering if there's a way to prevent this. I tried with: > > > > > > > > <body style=3D"cursor: default;"> > > > > > > > > But that doesn't seem to work. > > > > > > > > Thanks, > > > > > > > > Soren > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > > > Project Admins to receive an Apple iPod Mini FREE for your judgemen= t on > > > > who ports your project to Linux PPC the best. Sponsored by IBM. > > > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > > > _______________________________________________ > > > > xmljs-users mailing list > > > > xml...@li... > > > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > > Project Admins to receive an Apple iPod Mini FREE for your judgement = on > > > who ports your project to Linux PPC the best. Sponsored by IBM. > > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > > _______________________________________________ > > > xmljs-users mailing list > > > xml...@li... > > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > > > > > > > > >--__--__-- > > > >_______________________________________________ > >xmljs-users mailing list > >xml...@li... > >https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > >End of xmljs-users Digest >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users |
From: James S. E. <jam...@co...> - 2004-09-23 12:24:16
|
Soren, I wrote a chat system awhile back using XML for Script that didn't have=20 this problem. Here's a general observation that applies to chat as well as= =20 other animated client-side objects such as slideshows and scrollers. Use object-oriented programming in your chat client. In general, I find=20 that the hourglass seldom appears when I use repeated calls to a JavaScript= =20 object in a timing loop instead of ordinary function calls. Also, if you=20 have multiple concurrent setTimeout() and/or setInterval() calls running in= =20 your document, create an Animator object to consolidate them. Hope this helps. James At 11:03 PM 9/22/2004, you wrote: >Send xmljs-users mailing list submissions to > xml...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/xmljs-users >or, via email, send a message with subject or body 'help' to > xml...@li... > >You can reach the person managing the list at > xml...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of xmljs-users digest..." > > >Today's Topics: > > 1. Pevent hourglass from showing (=3D?ISO-8859-1?Q? S=3DF8ren?=3D= Pedersen) > 2. Re: Pevent hourglass from showing (=3D?ISO-8859-1?Q? S=3DF8ren?=3D= Pedersen) > 3. Re: Pevent hourglass from showing (David Joham) > >--__--__-- > >Message: 1 >To: xml...@li... >Date: Wed, 22 Sep 2004 08:50:56 +0200 >From: =3D?ISO-8859-1?Q? "S=3DF8ren?=3D Pedersen" <so...@si...> >Subject: [xmljs-users] Pevent hourglass from showing > >Hello > >I use xmljs for a chat system that loads a new xml document every 6 >seconds or so. It works great but every time the iframe loads the >hourglass (on the mouse pointer) shows. This is a bit annoying and I was >wondering if there's a way to prevent this. I tried with: > ><body style=3D"cursor: default;"> > >But that doesn't seem to work. > >Thanks, > >Soren > > >--__--__-- > >Message: 2 >Subject: Re: [xmljs-users] Pevent hourglass from showing >To: xml...@li... >Date: Wed, 22 Sep 2004 11:42:57 +0200 >From: =3D?ISO-8859-1?Q? "S=3DF8ren?=3D Pedersen" <so...@si...> > >Well, it does actually work in Explorer, but not in my Avant browser >(and Mozilla). > > > >On Wed, 22 Sep 2004 08:50:56 +0200, " S=3DF8ren Pedersen" ><so...@si...> said: > > Hello > >=3D20 > > I use xmljs for a chat system that loads a new xml document every 6 > > seconds or so. It works great but every time the iframe loads the > > hourglass (on the mouse pointer) shows. This is a bit annoying and I was > > wondering if there's a way to prevent this. I tried with: > >=3D20 > > <body style=3D3D"cursor: default;"> > >=3D20 > > But that doesn't seem to work. > >=3D20 > > Thanks, > >=3D20 > > Soren > >=3D20 > >=3D20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > >--__--__-- > >Message: 3 >Date: Wed, 22 Sep 2004 07:58:04 -0700 (PDT) >From: David Joham <dj...@ya...> >Subject: Re: [xmljs-users] Pevent hourglass from showing >To: "S=F8ren" Pedersen <so...@si...>,= xml...@li... > > >Hmm. Good question. Try cursor: pointer or cursor: text and see if maybe=20 >that works better. Other >than that, I'm at a loss. I'll think about it some more though and if I=20 >come up with anything I'll >let you know... > >David > >--- S=F8ren Pedersen <so...@si...> wrote: > > > Well, it does actually work in Explorer, but not in my Avant browser > > (and Mozilla). > > > > > > > > On Wed, 22 Sep 2004 08:50:56 +0200, " S=F8ren Pedersen" > > <so...@si...> said: > > > Hello > > > > > > I use xmljs for a chat system that loads a new xml document every 6 > > > seconds or so. It works great but every time the iframe loads the > > > hourglass (on the mouse pointer) shows. This is a bit annoying and I= was > > > wondering if there's a way to prevent this. I tried with: > > > > > > <body style=3D"cursor: default;"> > > > > > > But that doesn't seem to work. > > > > > > Thanks, > > > > > > Soren > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > > Project Admins to receive an Apple iPod Mini FREE for your judgement= on > > > who ports your project to Linux PPC the best. Sponsored by IBM. > > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > > _______________________________________________ > > > xmljs-users mailing list > > > xml...@li... > > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > > >--__--__-- > >_______________________________________________ >xmljs-users mailing list >xml...@li... >https://lists.sourceforge.net/lists/listinfo/xmljs-users > > >End of xmljs-users Digest |
From: David J. <dj...@ya...> - 2004-09-22 15:23:41
|
Hmm. Good question. Try cursor: pointer or cursor: text and see if maybe that works better. Other than that, I'm at a loss. I'll think about it some more though and if I come up with anything I'll let you know... David --- Søren Pedersen <so...@si...> wrote: > Well, it does actually work in Explorer, but not in my Avant browser > (and Mozilla). > > > > On Wed, 22 Sep 2004 08:50:56 +0200, " Søren Pedersen" > <so...@si...> said: > > Hello > > > > I use xmljs for a chat system that loads a new xml document every 6 > > seconds or so. It works great but every time the iframe loads the > > hourglass (on the mouse pointer) shows. This is a bit annoying and I was > > wondering if there's a way to prevent this. I tried with: > > > > <body style="cursor: default;"> > > > > But that doesn't seem to work. > > > > Thanks, > > > > Soren > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: P. <so...@si...> - 2004-09-22 09:43:01
|
Well, it does actually work in Explorer, but not in my Avant browser (and Mozilla). On Wed, 22 Sep 2004 08:50:56 +0200, " S=F8ren Pedersen" <so...@si...> said: > Hello >=20 > I use xmljs for a chat system that loads a new xml document every 6 > seconds or so. It works great but every time the iframe loads the > hourglass (on the mouse pointer) shows. This is a bit annoying and I was > wondering if there's a way to prevent this. I tried with: >=20 > <body style=3D"cursor: default;"> >=20 > But that doesn't seem to work. >=20 > Thanks, >=20 > Soren >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users |
From: P. <so...@si...> - 2004-09-22 07:46:58
|
Hello I use xmljs for a chat system that loads a new xml document every 6 seconds or so. It works great but every time the iframe loads the hourglass (on the mouse pointer) shows. This is a bit annoying and I was wondering if there's a way to prevent this. I tried with: <body style="cursor: default;"> But that doesn't seem to work. Thanks, Soren |
From: David J. <dj...@ya...> - 2004-09-10 22:01:28
|
Sorry, XSLT is not supported by XML for <SCRIPT>. You might try the ESPX/TinyXSL project at http://cjandia.com/2001/espx-tinyxsl/ and see if that meets your needs. Best regards, David --- Suman Raj <sum...@ad...> wrote: > Dear All, > > I like to know whether XMLJS support XSLT, i am in need of > cross-browser supporting XSL parser for javascritpt, Quick response is > highly appreciated. pls, help me to find this.. > > Regards, > > Suman Raj.V > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: Suman R. <sum...@ad...> - 2004-09-10 17:51:26
|
Dear All, I like to know whether XMLJS support XSLT, i am in need of cross-browser supporting XSL parser for javascritpt, Quick response is highly appreciated. pls, help me to find this.. Regards, Suman Raj.V |
From: P. <sys...@fa...> - 2004-09-01 16:39:53
|
Hi I solved the problem using Benno's suggestion of putting a random url-parameter on the xml-file loaded with xmlIOLoadLocalData. This is - of course - a much better than my own suggestion of modifying the core files. Now it's working fine. Thanks for the swift help, Soren Ps. Sorry for posting answers to private emails instead of mailinglist. Never really tried this before :-) On Wed, 01 Sep 2004 18:35:09 +0200, "S=F8ren Pedersen" <sys...@fa...> said: > Hi >=20 > I solved the problem using Benno's suggestion of putting a random > url-parameter on the xml-file loaded with xmlIOLoadLocalData. This is - > of course - a much better than my own suggestion of modifying the core > files. Now it's working fine. >=20 > Thanks for the swift help, >=20 > Soren >=20 >=20 >=20 > On Wed, 1 Sep 2004 08:46:05 -0700 (PDT), "David Joham" > <dj...@ya...> said: > >=20 > > Hmmm... Good question. Is this a problem you're seeing in development, = or > > somehow related to a > > production issue? > >=20 > > I just tried the following and it seemed to work in Konq and Mozilla. I > > added the following META > > tags to the top of the xml/html data file > >=20 > > <META HTTP-EQUIV=3D"Pragma" CONTENT=3D"no-cache"> > > <META HTTP-EQUIV=3D"Expires" CONTENT=3D"-1"> > >=20 > > It didn't seem to affect the data being returned to the IO function and > > it also seemed to allow > > the file to avoid being cached. > >=20 > > Please give that a shot and let me know if it works for you... > >=20 > >=20 > > Best regards, > >=20 > > David > >=20 > >=20 > > --- S\xF8ren Pedersen <sys...@fa...> wrote: > >=20 > > > Hello > > >=20 > > > I've just started playing with xmljs and it seems great. However, I've > > > got a problem. I would like to load a xml-file from a local site ever= y x > > > second. It works ok. However, if I change the xml-file the browser ke= eps > > > getting the old file. It is as if the xml file is kept in a cache or > > > something. The new file is not loadet until I open mywebpage in a new > > > browser session. > > >=20 > > > Is there a way to force the browser not to keep the xml file in cache? > > >=20 > > > Heres my code: > > >=20 > > > <script> > > > <!-- > > > setInterval("loadLocalXML()",3000)=20 > > >=20 > > > function loadLocalXML() { > > > xmlIOLoadLocalData("xmlData.xml.html", "callbackFunction"); > > > } > > >=20 > > > function callbackFunction(strXML) { > > > //instantiate a new XMLDoc object. Send any errors to the xmlError f= unction > > > var objDom =3D new XMLDoc(strXML, xmlError) > > > //get the root node > > > var objDomTree =3D objDom.docNode; > > > //get all of the elements named "TAG1" > > > var tag1Elements =3D objDomTree.getElements("msg"); > > > //get the first "TAG1" element > > > var element =3D tag1Elements[0]; > > > //now get the text > > > var text =3D element.getText(); > > > MM_changeProp('chatmsgs','','innerHTML',text,'DIV'); > > > } > > >=20 > > > function xmlError(e) { > > > alert(e); > > > } > > >=20 > > > function MM_findObj(n, d) { //v4.01 > > > var p,i,x; if(!d) d=3Ddocument; > > > if((p=3Dn.indexOf("?"))>0&&parent.frames.length) { > > > d=3Dparent.frames[n.substring(p+1)].document; n=3Dn.substring(0,p= );} > > > if(!(x=3Dd[n])&&d.all) x=3Dd.all[n]; for (i=3D0;!x&&i<d.forms.lengt= h;i++) > > > x=3Dd.forms[i][n]; > > > for(i=3D0;!x&&d.layers&&i<d.layers.length;i++) > > > x=3DMM_findObj(n,d.layers[i].document); > > > if(!x && d.getElementById) x=3Dd.getElementById(n); return x; > > > } > > >=20 > > > function MM_changeProp(objName,x,theProp,theValue) { //v6.0 > > > var obj =3D MM_findObj(objName); > > > if (obj && (theProp.indexOf("style.")=3D=3D-1 || obj.style)){ > > > if (theValue =3D=3D true || theValue =3D=3D false) > > > eval("obj."+theProp+"=3D"+theValue); > > > else eval("obj."+theProp+"=3D'"+theValue+"'"); > > > } > > > } > > > //--> > > > </script> > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by BEA Weblogic Workshop > > > FREE Java Enterprise J2EE developer tools! > > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > > http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick > > > _______________________________________________ > > > xmljs-users mailing list > > > xml...@li... > > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > >=20 > >=20 |
From: David J. <dj...@ya...> - 2004-09-01 15:46:15
|
Hmmm... Good question. Is this a problem you're seeing in development, or somehow related to a production issue? I just tried the following and it seemed to work in Konq and Mozilla. I added the following META tags to the top of the xml/html data file <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> It didn't seem to affect the data being returned to the IO function and it also seemed to allow the file to avoid being cached. Please give that a shot and let me know if it works for you... Best regards, David --- Søren Pedersen <sys...@fa...> wrote: > Hello > > I've just started playing with xmljs and it seems great. However, I've > got a problem. I would like to load a xml-file from a local site every x > second. It works ok. However, if I change the xml-file the browser keeps > getting the old file. It is as if the xml file is kept in a cache or > something. The new file is not loadet until I open mywebpage in a new > browser session. > > Is there a way to force the browser not to keep the xml file in cache? > > Heres my code: > > <script> > <!-- > setInterval("loadLocalXML()",3000) > > function loadLocalXML() { > xmlIOLoadLocalData("xmlData.xml.html", "callbackFunction"); > } > > function callbackFunction(strXML) { > //instantiate a new XMLDoc object. Send any errors to the xmlError function > var objDom = new XMLDoc(strXML, xmlError) > //get the root node > var objDomTree = objDom.docNode; > //get all of the elements named "TAG1" > var tag1Elements = objDomTree.getElements("msg"); > //get the first "TAG1" element > var element = tag1Elements[0]; > //now get the text > var text = element.getText(); > MM_changeProp('chatmsgs','','innerHTML',text,'DIV'); > } > > function xmlError(e) { > alert(e); > } > > function MM_findObj(n, d) { //v4.01 > var p,i,x; if(!d) d=document; > if((p=n.indexOf("?"))>0&&parent.frames.length) { > d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} > if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) > x=d.forms[i][n]; > for(i=0;!x&&d.layers&&i<d.layers.length;i++) > x=MM_findObj(n,d.layers[i].document); > if(!x && d.getElementById) x=d.getElementById(n); return x; > } > > function MM_changeProp(objName,x,theProp,theValue) { //v6.0 > var obj = MM_findObj(objName); > if (obj && (theProp.indexOf("style.")==-1 || obj.style)){ > if (theValue == true || theValue == false) > eval("obj."+theProp+"="+theValue); > else eval("obj."+theProp+"='"+theValue+"'"); > } > } > //--> > </script> > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: P. <sys...@fa...> - 2004-09-01 12:50:04
|
Hello I've just started playing with xmljs and it seems great. However, I've got a problem. I would like to load a xml-file from a local site every x second. It works ok. However, if I change the xml-file the browser keeps getting the old file. It is as if the xml file is kept in a cache or something. The new file is not loadet until I open mywebpage in a new browser session. Is there a way to force the browser not to keep the xml file in cache? Heres my code: <script> <!-- setInterval("loadLocalXML()",3000) function loadLocalXML() { xmlIOLoadLocalData("xmlData.xml.html", "callbackFunction"); } function callbackFunction(strXML) { //instantiate a new XMLDoc object. Send any errors to the xmlError function var objDom = new XMLDoc(strXML, xmlError) //get the root node var objDomTree = objDom.docNode; //get all of the elements named "TAG1" var tag1Elements = objDomTree.getElements("msg"); //get the first "TAG1" element var element = tag1Elements[0]; //now get the text var text = element.getText(); MM_changeProp('chatmsgs','','innerHTML',text,'DIV'); } function xmlError(e) { alert(e); } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_changeProp(objName,x,theProp,theValue) { //v6.0 var obj = MM_findObj(objName); if (obj && (theProp.indexOf("style.")==-1 || obj.style)){ if (theValue == true || theValue == false) eval("obj."+theProp+"="+theValue); else eval("obj."+theProp+"='"+theValue+"'"); } } //--> </script> |
From: David J. <dj...@ya...> - 2004-08-09 14:52:49
|
Great! I'm glad it's working for you! Good luck on your project... David --- Vini Bansal <got...@ya...> wrote: > Hi David, > > Yes, you were right. It had smething to do with more than one times. > I set a delay for one of them using setTimeOut(), and it worked out okay. > > Thanks for the quick response. > Vini > > David Joham <dj...@ya...> wrote: > > Hi Vini! > > I assume you're doing this with IE? What happens if you try it with Mozilla and use its > javascript > console or debugger? My guess is that you're getting into some kind of race condition. If what > you're seeing is common usage in your environment, you might want to do some form of > window.setTimeout to give the page a second or so to settle down before firing off the xmlIO > IFrame. > > Give that a shot and see what happens... > > > Best regards, > > David > > --- Vini Bansal wrote: > > > Hi Everybody, > > > > I'm using xmlIO.js and xmlEscape.js files to retrieve data from the server in a jsp page. > > which can be seen at www.sca.ae/scamw > > > > If you check your internet option for "Display a notification about every javascript error" > and > > browse this page, and try to refresh it frequently. Sometimes it display the following > > javascript error (please note only sometimes): > > > > Line-1 > > Char-1 > > Code-0 > > Error-"Object doesn't support this property or method" > > > "URL-"http://sca.ae/scamw/datasource?guid=24354354456&callbackFunction=renderFastBar&method=getUpperPanelData§or=0 > > > > I have added this function in xmlIO.js, which is the one I'm calling in form load. > > > > function fastBarProxyLoad(proxyURL, callbackFunction, method, sector ) { > > var dataSource = document.createElement("iframe"); > > var guid = "guid" + new Date().getTime(); > > dataSource.id = guid; > > dataSource.src = __trim(proxyURL, true, true) + "?guid=" + guid + "&callbackFunction=" + > > callbackFunction + "&method=" + method + > > "§or=" + sector; > > dataSource.style.position = "absolute"; > > dataSource.style.left = "-2000px"; > > document.body.appendChild(dataSource); > > return guid; > > > > } > > > > > > Can anybody tell me what is going wrong here. How can i trace this error in xmlIO.js file. > > > > Thanks, > > Vini > > > > > > > > > > > > > > > > --------------------------------- > > Do you Yahoo!? > > New and Improved Yahoo! Mail - Send 10MB messages! > > > > > > > > > > > > --------------------------------- > > Do you Yahoo!? > > Yahoo! Mail - 50x more storage than other providers! > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com |
From: Vini B. <got...@ya...> - 2004-08-09 11:22:16
|
Hi David, Yes, you were right. It had smething to do with more than one times. I set a delay for one of them using setTimeOut(), and it worked out okay. Thanks for the quick response. Vini David Joham <dj...@ya...> wrote: Hi Vini! I assume you're doing this with IE? What happens if you try it with Mozilla and use its javascript console or debugger? My guess is that you're getting into some kind of race condition. If what you're seeing is common usage in your environment, you might want to do some form of window.setTimeout to give the page a second or so to settle down before firing off the xmlIO IFrame. Give that a shot and see what happens... Best regards, David --- Vini Bansal wrote: > Hi Everybody, > > I'm using xmlIO.js and xmlEscape.js files to retrieve data from the server in a jsp page. > which can be seen at www.sca.ae/scamw > > If you check your internet option for "Display a notification about every javascript error" and > browse this page, and try to refresh it frequently. Sometimes it display the following > javascript error (please note only sometimes): > > Line-1 > Char-1 > Code-0 > Error-"Object doesn't support this property or method" > "URL-"http://sca.ae/scamw/datasource?guid=24354354456&callbackFunction=renderFastBar&method=getUpperPanelData§or=0 > > I have added this function in xmlIO.js, which is the one I'm calling in form load. > > function fastBarProxyLoad(proxyURL, callbackFunction, method, sector ) { > var dataSource = document.createElement("iframe"); > var guid = "guid" + new Date().getTime(); > dataSource.id = guid; > dataSource.src = __trim(proxyURL, true, true) + "?guid=" + guid + "&callbackFunction=" + > callbackFunction + "&method=" + method + > "§or=" + sector; > dataSource.style.position = "absolute"; > dataSource.style.left = "-2000px"; > document.body.appendChild(dataSource); > return guid; > > } > > > Can anybody tell me what is going wrong here. How can i trace this error in xmlIO.js file. > > Thanks, > Vini > > > > > > > > --------------------------------- > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: David J. <dj...@ya...> - 2004-08-06 16:47:16
|
Hello! Yes, the built-in entities are supported. CDATA is also supported. Here's a link to some docs that describe the W3C DOM parser's support for the entities and CDATA... http://xmljs.sourceforge.net/website/documentation-w3cdom.html#entities best regards, David --- Laurian Gridinoc <la...@gm...> wrote: > On Fri, 6 Aug 2004 08:15:10 -0700 (PDT), David Joham <dj...@ya...> wrote: > > Thanks for your question. Currently, XML for <SCRIPT> is a non-validating parser. It will > check > > for well formed XML, but not for any rules defined in a DTD or a Schema... > > Then as entities it supports just the default XML built-in: lt, gt, > amp, apos and quot, I suppose. > > Does it handle CDATA? > > Thank you, > -- > Laurian Gridinoc > Chief Developer > GRAPEFRUIT DESIGN > www.gd.ro > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: Laurian G. <la...@gm...> - 2004-08-06 15:18:09
|
On Fri, 6 Aug 2004 08:15:10 -0700 (PDT), David Joham <dj...@ya...> wrote: > Thanks for your question. Currently, XML for <SCRIPT> is a non-validating parser. It will check > for well formed XML, but not for any rules defined in a DTD or a Schema... Then as entities it supports just the default XML built-in: lt, gt, amp, apos and quot, I suppose. Does it handle CDATA? Thank you, -- Laurian Gridinoc Chief Developer GRAPEFRUIT DESIGN www.gd.ro |
From: David J. <dj...@ya...> - 2004-08-06 15:15:17
|
Hello! Thanks for your question. Currently, XML for <SCRIPT> is a non-validating parser. It will check for well formed XML, but not for any rules defined in a DTD or a Schema... Best regards, David --- Laurian Gridinoc <la...@gm...> wrote: > Hello, > > I could not find on the site if xmljs is DTD or schema aware... is it? > > Cheers, > -- > Laurian Gridinoc > Chief Developer > GRAPEFRUIT DESIGN > www.gd.ro > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: Laurian G. <la...@gm...> - 2004-08-06 08:45:41
|
Hello, I could not find on the site if xmljs is DTD or schema aware... is it? Cheers, -- Laurian Gridinoc Chief Developer GRAPEFRUIT DESIGN www.gd.ro |
From: David J. <dj...@ya...> - 2004-08-05 15:12:21
|
Hi Vini! I assume you're doing this with IE? What happens if you try it with Mozilla and use its javascript console or debugger? My guess is that you're getting into some kind of race condition. If what you're seeing is common usage in your environment, you might want to do some form of window.setTimeout to give the page a second or so to settle down before firing off the xmlIO IFrame. Give that a shot and see what happens... Best regards, David --- Vini Bansal <got...@ya...> wrote: > Hi Everybody, > > I'm using xmlIO.js and xmlEscape.js files to retrieve data from the server in a jsp page. > which can be seen at www.sca.ae/scamw > > If you check your internet option for "Display a notification about every javascript error" and > browse this page, and try to refresh it frequently. Sometimes it display the following > javascript error (please note only sometimes): > > Line-1 > Char-1 > Code-0 > Error-"Object doesn't support this property or method" > "URL-"http://sca.ae/scamw/datasource?guid=24354354456&callbackFunction=renderFastBar&method=getUpperPanelData§or=0 > > I have added this function in xmlIO.js, which is the one I'm calling in form load. > > function fastBarProxyLoad(proxyURL, callbackFunction, method, sector ) { > var dataSource = document.createElement("iframe"); > var guid = "guid" + new Date().getTime(); > dataSource.id = guid; > dataSource.src = __trim(proxyURL, true, true) + "?guid=" + guid + "&callbackFunction=" + > callbackFunction + "&method=" + method + > "§or=" + sector; > dataSource.style.position = "absolute"; > dataSource.style.left = "-2000px"; > document.body.appendChild(dataSource); > return guid; > > } > > > Can anybody tell me what is going wrong here. How can i trace this error in xmlIO.js file. > > Thanks, > Vini > > > > > > > > --------------------------------- > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! |
From: Vini B. <got...@ya...> - 2004-08-04 11:02:00
|
Hi Everybody, I'm using xmlIO.js and xmlEscape.js files to retrieve data from the server in a jsp page. which can be seen at www.sca.ae/scamw If you check your internet option for "Display a notification about every javascript error" and browse this page, and try to refresh it frequently. Sometimes it display the following javascript error (please note only sometimes): Line-1 Char-1 Code-0 Error-"Object doesn't support this property or method" "URL-"http://sca.ae/scamw/datasource?guid=24354354456&callbackFunction=renderFastBar&method=getUpperPanelData§or=0 I have added this function in xmlIO.js, which is the one I'm calling in form load. function fastBarProxyLoad(proxyURL, callbackFunction, method, sector ) { var dataSource = document.createElement("iframe"); var guid = "guid" + new Date().getTime(); dataSource.id = guid; dataSource.src = __trim(proxyURL, true, true) + "?guid=" + guid + "&callbackFunction=" + callbackFunction + "&method=" + method + "§or=" + sector; dataSource.style.position = "absolute"; dataSource.style.left = "-2000px"; document.body.appendChild(dataSource); return guid; } Can anybody tell me what is going wrong here. How can i trace this error in xmlIO.js file. Thanks, Vini --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! |
From: David J. <dj...@ya...> - 2004-08-03 15:34:34
|
Yea! Good luck with the rest of your project! David --- Eljon Greene <eg...@re...> wrote: > David, > > I just want to say thanks for your assistance...Everything is working fine now.... > > Eljon Greene > Web Software Engineer > 877.394.5644 \\ main > 904.567.2127 \\ direct > eg...@re... > www.recruitmax.com > > > > > From: David Joham > Sent: Fri 7/30/2004 1:42 PM > To: Eljon Greene; xml...@li... > Subject: RE: [xmljs-users] Cannot write back to root document object... > > > Hi Eljon! > > I think the problem is that you're setting the node Value on the element, rather than the text > node child of the element. You have > > pageRoot.getElementsByTagName(tElement).item(tOrder-1).getElementsByTagName('active').item(0).setNodeValue("No"); > > which will set the node value of the <active> element, but not the text node under it. > > > I think what you want to do is this: > pageRoot.getElementsByTagName(tElement).item(tOrder-1).getElementsByTagName('active').item(0).getFirstChild().setNodeValue("No"); > > Note the addition of the getFirstChild() call. That will return the text node that you're > actually > interested in. > > Actually, on text nodes you're supposed to use setData rather than setNodeValue, but if you look > at the code, all xmljs does in a setData is call setNodeValue so it doesn't really matter from a > technical perspective... > > The code above will set the node data/value (the visible text so to speak) of the text node > enclosed by the <active> node. When reading this value, you'll want to also make sure you're > reading from the text node to make sure you're actually getting the node value of the text > object. > You can sometimes get away with not doing this, but it's not advised. > > Please go ahead and give that a shot and let us know how it turns out.... > > > David > > > --- Eljon Greene <eg...@re...> wrote: > > > Sure, > > > > Here is an example of the code: > > > > function removeNode(tElement,tOrder){ > > if(pageRoot.getElementsByTagName(tElement).item(tOrder-1) != > > null) { > > tNode = > > pageRoot.getElementsByTagName(tElement).item(tOrder-1); // Get first > > element by node name (i.e. section, fieldgroup, fields) > > > > tNode.getElementsByTagName('active').item(0).setNodeValue("No"); // Set > > active element to "No" > > try { > > > > alert(tNode.getElementsByTagName('active').item(0).getNodeValue()); // > > Displays "No" > > > > alert(tNode.getElementsByTagName('active').item(0).getXML()); // > > Displays <active>Yes</active> > > > > } catch(e) { // Catch any exception > > if(e.code == > > DOMException.NO_MODIFICATION_ALLOWED_ERR) { > > // display the error message > > alert("XML Exception Error: Code > > not remove " + tElement + "."); > > } else { > > alert("Unknown exception"); > > alert(e.code); > > } > > } > > } else { > > alert("Null object"); > > } > > } > > > > Thanks for your assistance. > > > > Eljon > > > > -----Original Message----- > > From: xml...@li... > > [mailto:xml...@li...] On Behalf Of David > > Joham > > Sent: Thursday, July 29, 2004 11:33 AM > > To: Eljon Greene; xml...@li... > > Subject: Re: [xmljs-users] Cannot write back to root document object... > > > > > > > > Hi Eljon! > > > > Can you whip up a quick recreation of the problem you're seeing please? > > I'll take a look and see what's up... > > > > > > David > > > > --- Eljon Greene <eg...@re...> wrote: > > > > > Hey guys, > > > > > > I am new to XML for <script>. Everything is coming along pretty good > > > except for one thing...That is trying to write back to the parent > > > document node so that I can save this information on the server. I > > > can use "DOMNode.setNodeValue()" and then use "DOMNode.getNodeValue()" > > > > > and it works. However when I try "DOMNode.getXML()" the old value > > > still exists...I am trying to use global variables in my method > > > instead of the local variables. What am I doing wrong and how do I > > > write back to the "DOMDocument"? Thanks... > > > > > > > > > Eljon Greene > > > Web Software Engineer > > > 877.394.5644 \\ main > > > 904.567.2127 \\ direct > > > eg...@re... > > > www.recruitmax.com > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > > one more big change to announce. We are now OSTG- Open Source Technology > > Group. Come see the changes on the new OSTG site. www.ostg.com > > _______________________________________________ > > xmljs-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |
From: David J. <dj...@ya...> - 2004-08-03 15:34:24
|
Hi Tun Lin, I'm sorry, I really don't know. I've never worked with the browser's DOM directly in the manner you're trying. My only suggestion is to google the web for assistance. I know what you're trying to do is possible so there should be help available... Good luck! David --- Tun Lin <ch...@si...> wrote: > Hi David, > > It seems that the code that I have is unable to read the rdf file that I > want to import using javascript, thus causing the object not found error. Is > there something missing in the web.xml file in eXist that I am using? Is > there some configuration to be done? > > Hope to hear from you soon. > > ----- Original Message ----- > From: "David Joham" <dj...@ya...> > To: "Tun Lin" <ch...@si...>; <xml...@li...> > Sent: Tuesday, August 03, 2004 3:54 AM > Subject: Re: [xmljs-users] xml and javascript problem. > > > > Hi Tun Lin, > > > > Since your question doesn't directly relate to XML for <SCRIPT>, I can > only guess as to what the > > problem is. I'm guessing that you're running into a security problem > loading the file. Your > > JavaScript or HTML probably thinks that the file you're trying to load is > not from its originating > > domain when you're connect to localhost. When you're connected via a mount > point, it thinks your > > OK. > > > > Why this is, I'm not sure :( The only thing I can think of is to go > google for some examples of > > how this works. You might also want to look at the Sarissa project on > SourceForge for some help. > > The Sarissa project is a wrapper around the various browser's DOM > implementations. The URL for the > > project is https://sourceforge.net/projects/sarissa/ > > > > > > Good luck! > > > > > > David > > > > --- Tun Lin <ch...@si...> wrote: > > > > > > > > Hi everyone, > > > > > > I am trying xml dom in javascript in html file but I have a problem. > This is because when I try > > > a html with javascript as attached on localhost, it is unable to run > properly. However, if I > > > just double click on the file, it is able to run properly. > > > > > > Can anyone help, please? > > > > > > Regards, > > > > > > Tun Lin. > > --------------------------------- > > var arrTags = new Array();var uarrTags = new Array();var strContent = > "";var ie = (typeof > > window.ActiveXObject != 'undefined');var moz = (typeof > document.implementation != 'undefined') & > > (typeof document.implementation.createDocument != 'undefined');var xmlDoc; > function > > importXML(file) { if (moz) { xmlDoc = > document.implementation.createDocument("", "doc", > > null); xmlDoc.onload = readXML; xmlDoc.load(file); } else if (ie) > { xmlDoc = new > > ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; > while(xmlDoc.readyState != 4) {}; > > xmlDoc.load(file); readXML(); }}function readXML() { root = > xmlDoc.documentElement; > > crawl(root, 0); uarrTags=findUniqueTags(arrTags);for ( var i = 0; i "; > //strContent = > > strContent + indent + "attributes = " + node.attributes + " > > "; //strContent = strContent + indent + "childNodes = " + > node.childNodes + " > > "; //strContent = strContent + indent + "firstChild = " + > node.firstChild + " > > "; //strContent = strContent + indent + "lastChild = " + node.lastChild > + " > > "; //strContent = strContent + indent + "nextSibling = " + > node.nextSibling + " > > "; //strContent = strContent + indent + "nodeName = " + node.nodeName + > " > > "; strContent = strContent + node.nodeName + " > > ";var n = node.nodeName;var tokenizer = > n.split(":")if(n!="#text"){arrTags.push(tokenizer[1]);} > > //if(strContent.equals("rdf:RDF")) //{ //strContent = strContent; > //}//index++; > > //arrTags.add(strContent); > //document.myform.example.options[0]=strContent; //strContent = > > strContent + indent + "nodeType = " + node.nodeType + " > > "; //strContent = strContent + indent + "nodeValue = " + node.nodeValue > + " > > "; //strContent = strContent + indent + "ownerDocument = " + > node.ownerDocument + " > > "; //strContent = strContent + indent + "parentNode = " + > node.parentNode + " > > "; //strContent = strContent + indent + "previousSibling = " + > node.previousSibling + " > > "; if (node.attributes) { if (node.attributes.length > 0) > { for (var i = 0; i "; > > //strContent = strContent + indent + " " + "attribute specified = > " + attribute.specified > > + " > > "; //strContent = strContent + indent + " " + "attribute value > = " + attribute.value + > > " > > "; } } } } if (node.firstChild) { > crawl(node.firstChild, level + 1); } if > > (node.nextSibling) { crawl(node.nextSibling, level); } strContent = > strContent + " > > ";}function findUniqueTags(arrAllTags) { var arrUniqueTags = new > Array();var tagsPresentCounter = > > 0; for (i=0; i > > This is a more "real life" example, powered by a single XQuery script. > > > > The sample collection contains 71098 book description (in RDF/XML) taken > from our local > > university library. > > Search in Search > what > > Interpret as Any > Creator,Editor > > Title Description Subject Creator,Editor Title > Description > > Subject Subject Creator,Editor Title > Description > > [input] near exact match word > list > > or and Any > Creator,Editor > > Title Description Subject Creator,Editor Title > Description > > Subject Subject Creator,Editor Title > Description > > [input] near exact match word list > > 15 30 50 100 hits will be displayed > > [input] > > You may use wildcards *, ? and character ranges like [a-zA-Z] for > search terms > > > > > > |
From: Tun L. <ch...@si...> - 2004-08-03 00:59:22
|
Hi David, It seems that the code that I have is unable to read the rdf file that I want to import using javascript, thus causing the object not found error. Is there something missing in the web.xml file in eXist that I am using? Is there some configuration to be done? Hope to hear from you soon. ----- Original Message ----- From: "David Joham" <dj...@ya...> To: "Tun Lin" <ch...@si...>; <xml...@li...> Sent: Tuesday, August 03, 2004 3:54 AM Subject: Re: [xmljs-users] xml and javascript problem. > Hi Tun Lin, > > Since your question doesn't directly relate to XML for <SCRIPT>, I can only guess as to what the > problem is. I'm guessing that you're running into a security problem loading the file. Your > JavaScript or HTML probably thinks that the file you're trying to load is not from its originating > domain when you're connect to localhost. When you're connected via a mount point, it thinks your > OK. > > Why this is, I'm not sure :( The only thing I can think of is to go google for some examples of > how this works. You might also want to look at the Sarissa project on SourceForge for some help. > The Sarissa project is a wrapper around the various browser's DOM implementations. The URL for the > project is https://sourceforge.net/projects/sarissa/ > > > Good luck! > > > David > > --- Tun Lin <ch...@si...> wrote: > > > > > Hi everyone, > > > > I am trying xml dom in javascript in html file but I have a problem. This is because when I try > > a html with javascript as attached on localhost, it is unable to run properly. However, if I > > just double click on the file, it is able to run properly. > > > > Can anyone help, please? > > > > Regards, > > > > Tun Lin. > --------------------------------- > var arrTags = new Array();var uarrTags = new Array();var strContent = "";var ie = (typeof > window.ActiveXObject != 'undefined');var moz = (typeof document.implementation != 'undefined') & > (typeof document.implementation.createDocument != 'undefined');var xmlDoc; function > importXML(file) { if (moz) { xmlDoc = document.implementation.createDocument("", "doc", > null); xmlDoc.onload = readXML; xmlDoc.load(file); } else if (ie) { xmlDoc = new > ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; while(xmlDoc.readyState != 4) {}; > xmlDoc.load(file); readXML(); }}function readXML() { root = xmlDoc.documentElement; > crawl(root, 0); uarrTags=findUniqueTags(arrTags);for ( var i = 0; i "; //strContent = > strContent + indent + "attributes = " + node.attributes + " > "; //strContent = strContent + indent + "childNodes = " + node.childNodes + " > "; //strContent = strContent + indent + "firstChild = " + node.firstChild + " > "; //strContent = strContent + indent + "lastChild = " + node.lastChild + " > "; //strContent = strContent + indent + "nextSibling = " + node.nextSibling + " > "; //strContent = strContent + indent + "nodeName = " + node.nodeName + " > "; strContent = strContent + node.nodeName + " > ";var n = node.nodeName;var tokenizer = n.split(":")if(n!="#text"){arrTags.push(tokenizer[1]);} > //if(strContent.equals("rdf:RDF")) //{ //strContent = strContent; //}//index++; > //arrTags.add(strContent); //document.myform.example.options[0]=strContent; //strContent = > strContent + indent + "nodeType = " + node.nodeType + " > "; //strContent = strContent + indent + "nodeValue = " + node.nodeValue + " > "; //strContent = strContent + indent + "ownerDocument = " + node.ownerDocument + " > "; //strContent = strContent + indent + "parentNode = " + node.parentNode + " > "; //strContent = strContent + indent + "previousSibling = " + node.previousSibling + " > "; if (node.attributes) { if (node.attributes.length > 0) { for (var i = 0; i "; > //strContent = strContent + indent + " " + "attribute specified = " + attribute.specified > + " > "; //strContent = strContent + indent + " " + "attribute value = " + attribute.value + > " > "; } } } } if (node.firstChild) { crawl(node.firstChild, level + 1); } if > (node.nextSibling) { crawl(node.nextSibling, level); } strContent = strContent + " > ";}function findUniqueTags(arrAllTags) { var arrUniqueTags = new Array();var tagsPresentCounter = > 0; for (i=0; i > This is a more "real life" example, powered by a single XQuery script. > > The sample collection contains 71098 book description (in RDF/XML) taken from our local > university library. > Search in Search what > Interpret as Any Creator,Editor > Title Description Subject Creator,Editor Title Description > Subject Subject Creator,Editor Title Description > [input] near exact match word list > or and Any Creator,Editor > Title Description Subject Creator,Editor Title Description > Subject Subject Creator,Editor Title Description > [input] near exact match word list > 15 30 50 100 hits will be displayed > [input] > You may use wildcards *, ? and character ranges like [a-zA-Z] for search terms > > |
From: David J. <dj...@ya...> - 2004-08-02 19:54:19
|
Hi Tun Lin, Since your question doesn't directly relate to XML for <SCRIPT>, I can only guess as to what the problem is. I'm guessing that you're running into a security problem loading the file. Your JavaScript or HTML probably thinks that the file you're trying to load is not from its originating domain when you're connect to localhost. When you're connected via a mount point, it thinks your OK. Why this is, I'm not sure :( The only thing I can think of is to go google for some examples of how this works. You might also want to look at the Sarissa project on SourceForge for some help. The Sarissa project is a wrapper around the various browser's DOM implementations. The URL for the project is https://sourceforge.net/projects/sarissa/ Good luck! David --- Tun Lin <ch...@si...> wrote: > > Hi everyone, > > I am trying xml dom in javascript in html file but I have a problem. This is because when I try > a html with javascript as attached on localhost, it is unable to run properly. However, if I > just double click on the file, it is able to run properly. > > Can anyone help, please? > > Regards, > > Tun Lin. --------------------------------- var arrTags = new Array();var uarrTags = new Array();var strContent = "";var ie = (typeof window.ActiveXObject != 'undefined');var moz = (typeof document.implementation != 'undefined') & (typeof document.implementation.createDocument != 'undefined');var xmlDoc; function importXML(file) { if (moz) { xmlDoc = document.implementation.createDocument("", "doc", null); xmlDoc.onload = readXML; xmlDoc.load(file); } else if (ie) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; while(xmlDoc.readyState != 4) {}; xmlDoc.load(file); readXML(); }}function readXML() { root = xmlDoc.documentElement; crawl(root, 0); uarrTags=findUniqueTags(arrTags);for ( var i = 0; i "; //strContent = strContent + indent + "attributes = " + node.attributes + " "; //strContent = strContent + indent + "childNodes = " + node.childNodes + " "; //strContent = strContent + indent + "firstChild = " + node.firstChild + " "; //strContent = strContent + indent + "lastChild = " + node.lastChild + " "; //strContent = strContent + indent + "nextSibling = " + node.nextSibling + " "; //strContent = strContent + indent + "nodeName = " + node.nodeName + " "; strContent = strContent + node.nodeName + " ";var n = node.nodeName;var tokenizer = n.split(":")if(n!="#text"){arrTags.push(tokenizer[1]);} //if(strContent.equals("rdf:RDF")) //{ //strContent = strContent; //}//index++; //arrTags.add(strContent); //document.myform.example.options[0]=strContent; //strContent = strContent + indent + "nodeType = " + node.nodeType + " "; //strContent = strContent + indent + "nodeValue = " + node.nodeValue + " "; //strContent = strContent + indent + "ownerDocument = " + node.ownerDocument + " "; //strContent = strContent + indent + "parentNode = " + node.parentNode + " "; //strContent = strContent + indent + "previousSibling = " + node.previousSibling + " "; if (node.attributes) { if (node.attributes.length > 0) { for (var i = 0; i "; //strContent = strContent + indent + " " + "attribute specified = " + attribute.specified + " "; //strContent = strContent + indent + " " + "attribute value = " + attribute.value + " "; } } } } if (node.firstChild) { crawl(node.firstChild, level + 1); } if (node.nextSibling) { crawl(node.nextSibling, level); } strContent = strContent + " ";}function findUniqueTags(arrAllTags) { var arrUniqueTags = new Array();var tagsPresentCounter = 0; for (i=0; i This is a more "real life" example, powered by a single XQuery script. The sample collection contains 71098 book description (in RDF/XML) taken from our local university library. Search in Search what Interpret as Any Creator,Editor Title Description Subject Creator,Editor Title Description Subject Subject Creator,Editor Title Description [input] near exact match word list or and Any Creator,Editor Title Description Subject Creator,Editor Title Description Subject Subject Creator,Editor Title Description [input] near exact match word list 15 30 50 100 hits will be displayed [input] You may use wildcards *, ? and character ranges like [a-zA-Z] for search terms |
From: Eljon G. <eg...@re...> - 2004-08-02 12:34:06
|
David, I just want to say thanks for your assistance...Everything is working fine = now.... Eljon Greene Web Software Engineer 877.394.5644 \\ main 904.567.2127 \\ direct eg...@re... www.recruitmax.com From: David Joham Sent: Fri 7/30/2004 1:42 PM To: Eljon Greene; xml...@li... Subject: RE: [xmljs-users] Cannot write back to root document object... Hi Eljon! I think the problem is that you're setting the node Value on the element, r= ather than the text node child of the element. You have pageRoot.getElementsByTagName(tElement).item(tOrder-1).getElementsByTagName= ('active').item(0).setNodeValue("No"); which will set the node value of the <active> element, but not the text nod= e under it. I think what you want to do is this: pageRoot.getElementsByTagName(tElement).item(tOrder-1).getElementsByTagName= ('active').item(0).getFirstChild().setNodeValue("No"); Note the addition of the getFirstChild() call. That will return the text no= de that you're actually interested in. Actually, on text nodes you're supposed to use setData rather than setNodeV= alue, but if you look at the code, all xmljs does in a setData is call setNodeValue so it doesn't= really matter from a technical perspective... The code above will set the node data/value (the visible text so to speak) = of the text node enclosed by the <active> node. When reading this value, you'll want to also= make sure you're reading from the text node to make sure you're actually getting the node va= lue of the text object. You can sometimes get away with not doing this, but it's not advised. Please go ahead and give that a shot and let us know how it turns out.... David --- Eljon Greene <eg...@re...> wrote: > Sure, >=20 > Here is an example of the code: >=20 > function removeNode(tElement,tOrder){ > if(pageRoot.getElementsByTagName(tElement).item(tOrder-1) !=3D > null) { =20 > tNode =3D > pageRoot.getElementsByTagName(tElement).item(tOrder-1); // Get first > element by node name (i.e. section, fieldgroup, fields)=20 > =09 > tNode.getElementsByTagName('active').item(0).setNodeValue("No"); // Set > active element to "No" > try { > =09 > alert(tNode.getElementsByTagName('active').item(0).getNodeValue()); // > Displays "No" > =09 > alert(tNode.getElementsByTagName('active').item(0).getXML()); // > Displays <active>Yes</active> > =09 > } catch(e) { // Catch any exception > if(e.code =3D=3D > DOMException.NO_MODIFICATION_ALLOWED_ERR) { > // display the error message=20 > alert("XML Exception Error: Code > not remove " + tElement + "."); > } else { > alert("Unknown exception"); > alert(e.code);=20 > } > } > } else { > alert("Null object"); > }=09 > } >=20 > Thanks for your assistance. >=20 > Eljon >=20 > -----Original Message----- > From: xml...@li... > [mailto:xml...@li...] On Behalf Of David > Joham > Sent: Thursday, July 29, 2004 11:33 AM > To: Eljon Greene; xml...@li... > Subject: Re: [xmljs-users] Cannot write back to root document object... >=20 >=20 >=20 > Hi Eljon! >=20 > Can you whip up a quick recreation of the problem you're seeing please? > I'll take a look and see what's up... >=20 >=20 > David >=20 > --- Eljon Greene <eg...@re...> wrote: >=20 > > Hey guys, > >=20 > > I am new to XML for <script>. Everything is coming along pretty good=20 > > except for one thing...That is trying to write back to the parent=20 > > document node so that I can save this information on the server. I=20 > > can use "DOMNode.setNodeValue()" and then use "DOMNode.getNodeValue()" >=20 > > and it works. However when I try "DOMNode.getXML()" the old value=20 > > still exists...I am trying to use global variables in my method=20 > > instead of the local variables. What am I doing wrong and how do I=20 > > write back to the "DOMDocument"? Thanks... > >=20 > >=20 > > Eljon Greene > > Web Software Engineer > > 877.394.5644 \\ main > > 904.567.2127 \\ direct > > eg...@re... > > www.recruitmax.com > >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users >=20 ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ xmljs-users mailing list xml...@li... https://lists.sourceforge.net/lists/listinfo/xmljs-users |