You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(18) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(11) |
Feb
(2) |
Mar
(1) |
Apr
(4) |
May
(23) |
Jun
(17) |
Jul
(1) |
Aug
(17) |
Sep
(4) |
Oct
(14) |
Nov
(1) |
Dec
(2) |
2002 |
Jan
|
Feb
(2) |
Mar
(15) |
Apr
|
May
(19) |
Jun
(2) |
Jul
(8) |
Aug
(24) |
Sep
(21) |
Oct
(17) |
Nov
(11) |
Dec
(20) |
2003 |
Jan
(17) |
Feb
(19) |
Mar
(21) |
Apr
(13) |
May
(14) |
Jun
(7) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
2004 |
Jan
(5) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(1) |
Jun
(5) |
Jul
(12) |
Aug
(3) |
Sep
(14) |
Oct
(1) |
Nov
(4) |
Dec
(3) |
2005 |
Jan
(1) |
Feb
(6) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2007 |
Jan
(1) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(8) |
Oct
(1) |
Nov
|
Dec
|
From: Steve B. <Ste...@zv...> - 2002-10-08 11:50:45
|
Larry W. Virden wrote: > Has anyone figured out what changes need to be made to the CVS's > Makefile.in, etc. so that the resulting Makefile runs the test suite? > Also, anyone have the fixes so that --enable-symbols generates the > appropriate flags? Yesterday I updated my CVS tree with Andreas' changes. How recently have you updated? I haven't yet tried to build using Andreas' config changes; that's my next task. However, Andreas recently reported getting TclDOM/libxml2 built on Windows (for ActiveTcl). I'm about to start working on v2.4. The focus of this release will be getting the build and install system working smoothly. Regards, Steve Ball > I know this stuff is tricky - I was just hoping that someone else > has struggled through the things like > > --- Makefile.in.orig Tue Oct 8 06:25:42 2002 > +++ Makefile.in Tue Oct 8 06:25:59 2002 > @@ -49,3 +49,3 @@ > Tcldom_OBJECTS = $(Tcldom_SOURCES:.c=.@OBJEXT@) > -Tcldom_LIB_FILE = @Tcldom_LIB_FILE@ > +Tcldom_LIB_FILE = @TCLDOM_LIB_FILE@ > > At least, it appears that configure only references TCLDOM_LIB_FILE and > thus doesn't make the substitution. > > Even with this change, however, I get this when I try to run the > make test: > > echo load ./libtcldom2.3.so \; cd /vol/tclsrcsol/tcl84/tcldom/tests \; source all | TCL_LIBRARY=`echo /vol/tclsrcsol/tcl84/tcl/library` LD_LIBRARY_PATH=".:/vol/tclsrcsol/tcl84/tcl/unix:/usr/dt/lib:/usr/openwin/lib:/usr/lib:/cas/lib/sun4" LIBPATH=".:/vol/tclsrcsol/tcl84/tcl/unix:" SHLIB_PATH=".:/vol/tclsrcsol/tcl84/tcl/unix:" PATH=".:/vol/tclsrcsol/tcl84/tcl/unix:/opt/SUNWspro/bin:/volws/lwv26/ldatae/bin:/projects/sprs_lwv/sol26/bin:/projects/sprs_lwv/sol26/bin/mime:/projects/sprs_lwv/sol2/bin:/projects/sprs_lwv/bin:/projects/sprs_lwv/bin/mime:/home/lwv26/bin/D.news:/usr/perl5/bin:/projects/gnu/sparc-sun-solaris2.6/bin:/usr/tcl84/bin:/usr/tcl83/bin:/vol/tclsrcsol/TclDevKit/bin:/projects/xopsrc/sun4/bin:/projects/xopsrc/bin:/usr/atria/bin:/projects/intranet/bin:/projects/clearcase/bin:/vol/adobe/Acrobat4.05/bin:/usr/perl5/lib/site_perl/5.005/sun4-solaris/auto/Image/Magick/bin:/opt/sfw/bin:/home/lwv26/bin/D.aws:/home/lwv26/bin/sol2:/home/lwv26/bin/D.frontend:/home/lwv26/bin/D. k! > sh:/cas/test/bin/sun4:/projects/sp > rs_lwv/bin/sol2:/usr/j2se/bin:/usr/java/bin:/home/lwv26/bin/sun4:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/cas/bin/sun4:/cas/abin/sun4:/cas/X11/sun4/bin:/usr/ccs/bin:/lprod/bin:/usr/sbin:/usr/ucb:/cas/tools/bin/sun4:/cas/X11/sun4/tools/bin:/home/lwv26/bin:/opt/EMCpower/bin:/etc:/cas/tools/pdbin/sun4:/home/lwv26/bin/D.mistypes:/home/lwv26/bin/D.toys:/home/lwv26/bin/D.tools:/projects/npd/npdweb/bin-sol2:/vol/tclsrcsol/TclPro/bin" TCLLIBPATH="." /usr/tcl84/bin/tclsh8.4 > couldn't read file "all": no such file or directory -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Larry W. V. <lv...@ca...> - 2002-10-08 10:33:43
|
Has anyone figured out what changes need to be made to the CVS's Makefile.in, etc. so that the resulting Makefile runs the test suite? Also, anyone have the fixes so that --enable-symbols generates the appropriate flags? I know this stuff is tricky - I was just hoping that someone else has struggled through the things like --- Makefile.in.orig Tue Oct 8 06:25:42 2002 +++ Makefile.in Tue Oct 8 06:25:59 2002 @@ -49,3 +49,3 @@ Tcldom_OBJECTS = $(Tcldom_SOURCES:.c=.@OBJEXT@) -Tcldom_LIB_FILE = @Tcldom_LIB_FILE@ +Tcldom_LIB_FILE = @TCLDOM_LIB_FILE@ At least, it appears that configure only references TCLDOM_LIB_FILE and thus doesn't make the substitution. Even with this change, however, I get this when I try to run the make test: echo load ./libtcldom2.3.so \; cd /vol/tclsrcsol/tcl84/tcldom/tests \; source all | TCL_LIBRARY=`echo /vol/tclsrcsol/tcl84/tcl/library` LD_LIBRARY_PATH=".:/vol/tclsrcsol/tcl84/tcl/unix:/usr/dt/lib:/usr/openwin/lib:/usr/lib:/cas/lib/sun4" LIBPATH=".:/vol/tclsrcsol/tcl84/tcl/unix:" SHLIB_PATH=".:/vol/tclsrcsol/tcl84/tcl/unix:" PATH=".:/vol/tclsrcsol/tcl84/tcl/unix:/opt/SUNWspro/bin:/volws/lwv26/ldatae/bin:/projects/sprs_lwv/sol26/bin:/projects/sprs_lwv/sol26/bin/mime:/projects/sprs_lwv/sol2/bin:/projects/sprs_lwv/bin:/projects/sprs_lwv/bin/mime:/home/lwv26/bin/D.news:/usr/perl5/bin:/projects/gnu/sparc-sun-solaris2.6/bin:/usr/tcl84/bin:/usr/tcl83/bin:/vol/tclsrcsol/TclDevKit/bin:/projects/xopsrc/sun4/bin:/projects/xopsrc/bin:/usr/atria/bin:/projects/intranet/bin:/projects/clearcase/bin:/vol/adobe/Acrobat4.05/bin:/usr/perl5/lib/site_perl/5.005/sun4-solaris/auto/Image/Magick/bin:/opt/sfw/bin:/home/lwv26/bin/D.aws:/home/lwv26/bin/sol2:/home/lwv26/bin/D.frontend:/home/lwv26/bin/D.k! sh:/cas/test/bin/sun4:/projects/sp rs_lwv/bin/sol2:/usr/j2se/bin:/usr/java/bin:/home/lwv26/bin/sun4:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/cas/bin/sun4:/cas/abin/sun4:/cas/X11/sun4/bin:/usr/ccs/bin:/lprod/bin:/usr/sbin:/usr/ucb:/cas/tools/bin/sun4:/cas/X11/sun4/tools/bin:/home/lwv26/bin:/opt/EMCpower/bin:/etc:/cas/tools/pdbin/sun4:/home/lwv26/bin/D.mistypes:/home/lwv26/bin/D.toys:/home/lwv26/bin/D.tools:/projects/npd/npdweb/bin-sol2:/vol/tclsrcsol/TclPro/bin" TCLLIBPATH="." /usr/tcl84/bin/tclsh8.4 couldn't read file "all": no such file or directory -- Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ > Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Derek F. <fo...@hu...> - 2002-10-01 07:37:12
|
> 2. My second thought was "I'm not certain exactly what is being asked." > First, I read the comment that you can't ship with a new library, but then > later, I read the question "is there any way [to get the software] to work > correctly?" Seems like a conflict in requirements - how would you get > things to work without a new version of software? I was asking for workarounds to known bugs in the version of the software I'm using. I've made the switch to ActiveTcl-8.4.0.1, which (mostly) works with CDATA sections properly, but doesn't give the internal DTD information from a file. I've taken to reopening the XML file and parsing it myself with regexes etc. to get that information out. Works for now. > application can be installed as frequently as you wish? If so, return to > my first thought - a tclkit/starkit layout would allow you to ship your > application as often as needed to get around bugs. I thought of a tclkit, but I've never created one, and with 14 days left before my deadline, now doesn't feel like the best time to learn! My project needs to run on Windows, and I've never done any Windows work. I don't have a Windows compiler, much less any experience of using one. For now, I'm still making progress with ActiveTcl-8.4.0.1, albeit with some horrific workarounds. -- 8:10am up 68 days, 22:38, 2 users, load average: 0.17, 0.12, 0.10 |
From: Steve B. <Ste...@zv...> - 2002-09-30 20:54:25
|
Derek Fountain wrote: > I've been having a better look at ActiveTcl-8.4.0.1 and seem to have it > running the pure tcl parser by putting "package require tclparser" just after > my "package require xml". (How do I tell which parser it's using?) ::xml::parserclass info default > The problem that appears now is that an area of text inside a CDATA section > might get serialised such that it doesn't have the CDATA wrapper on output - > the meta characters get escaped individually. Looking at the code, there > seems to be a "node:cdatasection" flag on the node which is used to preserve > these CDATA wrappers. However, I'm not sure this flag is being set properly a > parse time. It certainly doesn't seem to be working for me! > > Unfortunately I need those CDATA wrappers to stay in place, but only where > they appear in the input (so setting ::dom::maxSpecials to 0 doesn't help). > They are being used to protect HTML areas in the text which a guy downstream > is having to jump through some serious XSL hoops to get rendering right. > Strictly speaking I think he's doing kludgey things, using "CDATA" as markers > for certain behaviours, but I can't change what he's doing. > > Is there any way I can get that node:cdatasection flag to work correctly? You and the downstream guy need to get a better understanding of exactly what your XML documents contain. Consider these two documents: <Example><></Example> and <Example><![CDATA[<>]]></Example> They are EXACTLY the same document. CDATA Sections are simply a syntactic convenience to save having to escape individual characters. TclXML and TclDOM operate at a slightly higher level than the raw XML syntax; the XML Infoset. TclDOM manages the raw syntax on your behalf. In the case of text nodes, if the number of special characters exceeds some threshold then it will automatically use a CDATA Section. You may like to investigate playing around with the threshold value... The other thing to note is that if the downstream guy is using XSLT then I don't understand why the use of CDATA sections (or not) is an issue at all. XSLT never even sees the CDATA sections - they get transparently turned into text nodes before template processing begins. This one of the major differences between the XPath and DOM data models. Summary: relying on the use of CDATA Sections in an XML document is bad application design. HTHs, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Larry W. V. <lv...@ca...> - 2002-09-30 19:38:19
|
> Unfortunately, plugging new versions of libraries in isn't really possible > for my project. : >Is there any way I can get that node:cdatasection flag to work correctly? Two thoughts came to mind in reading your msg. 1. At the recent Tcl conference, the concept of tclkit/starkit was discussed. This was a way of building Tcl application distributions so that all one has to send out to a desktop is 1-3 files (depending on the circumstances, software design, etc.) . 2. My second thought was "I'm not certain exactly what is being asked." First, I read the comment that you can't ship with a new library, but then later, I read the question "is there any way [to get the software] to work correctly?" Seems like a conflict in requirements - how would you get things to work without a new version of software? Or is the situation that Tcl can only be installed one time but updates of the application can be installed as frequently as you wish? If so, return to my first thought - a tclkit/starkit layout would allow you to ship your application as often as needed to get around bugs. -- Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ > Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Derek F. <fo...@hu...> - 2002-09-30 10:02:34
|
> Basically I'd say the version of TclXML and TclDOM that shipped with > ActiveTcl 8.3.4.3 were buggy. ActiveTcl 8.4.0.1 would be using more > recent versions, which have different bugs (like the lack of a '-parser' > option). Please submit bug reports for those problems. > > It should not be difficult to adjust the packages being loaded in > ActiveTcl 8.4.0.1 to use the pure Tcl implementations. > Firstly, make sure you have the latest release: v2.3. > Secondly, use 'package require tclparser' to load the pure-Tcl > parser first and make it the default parser. Failing that, remove > the TclXML/TclDOM DLLs to force the pure Tcl packages to be used. Unfortunately, plugging new versions of libraries in isn't really possible for my project. I have to distribute some code across my department, and one of the conditions of my doing it in Tcl as opposed to C++ was that I just distribute a single binary. I haggled such that installing one, easy to install package (ActiveTcl in this case), as well as the "binary" would be acceptable. The users can manage that on both Win32 and Linux. Patching in various versions of libraries is something I really need to avoid if possible. I've been having a better look at ActiveTcl-8.4.0.1 and seem to have it running the pure tcl parser by putting "package require tclparser" just after my "package require xml". (How do I tell which parser it's using?) The problem that appears now is that an area of text inside a CDATA section might get serialised such that it doesn't have the CDATA wrapper on output - the meta characters get escaped individually. Looking at the code, there seems to be a "node:cdatasection" flag on the node which is used to preserve these CDATA wrappers. However, I'm not sure this flag is being set properly a parse time. It certainly doesn't seem to be working for me! Unfortunately I need those CDATA wrappers to stay in place, but only where they appear in the input (so setting ::dom::maxSpecials to 0 doesn't help). They are being used to protect HTML areas in the text which a guy downstream is having to jump through some serious XSL hoops to get rendering right. Strictly speaking I think he's doing kludgey things, using "CDATA" as markers for certain behaviours, but I can't change what he's doing. Is there any way I can get that node:cdatasection flag to work correctly? -- 10:45am up 68 days, 1:12, 2 users, load average: 0.00, 0.02, 0.00 |
From: Steve B. <Ste...@zv...> - 2002-09-29 20:23:52
|
Derek Fountain wrote: > I'm trying to work out the status of CDATA support in text nodes in various > versions of ActiveTcl. I have this little test script: [...snip...] Script looks fine to me. > With ActiveTcl-8.3.4.3 this returns an empty string. If I remove the -parser > option, it returns the CDATA text. Unfortunately, the default parser is too > buggy - I need the tcl parser to make the rest of my script work. > > ActiveTcl-8.4.0.1 doesn't have the -parser option (I thought it used the same > Tcldom package as 8.3.4.3, but must be mistaken), and has other issues in > other places which prevent my script working. > > Basically, I want to stick with ActiveTcl-8.3.4.3, and the tcl parser, and > get the text from CDATA sections. Can I do that? Basically I'd say the version of TclXML and TclDOM that shipped with ActiveTcl 8.3.4.3 were buggy. ActiveTcl 8.4.0.1 would be using more recent versions, which have different bugs (like the lack of a '-parser' option). Please submit bug reports for those problems. It should not be difficult to adjust the packages being loaded in ActiveTcl 8.4.0.1 to use the pure Tcl implementations. Firstly, make sure you have the latest release: v2.3. Secondly, use 'package require tclparser' to load the pure-Tcl parser first and make it the default parser. Failing that, remove the TclXML/TclDOM DLLs to force the pure Tcl packages to be used. HTHs, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Derek F. <fo...@hu...> - 2002-09-27 14:38:01
|
I'm trying to work out the status of CDATA support in text nodes in various versions of ActiveTcl. I have this little test script: --- #!/bin/sh # \ exec tclsh8.3 "$0" "$@" package require xml package require dom set xml {<test><![CDATA[Some text with a <br/> in it]]></test>} set docNode [::dom::DOMImplementation parse $xml -parser tcl] set elementNode [dom::node cget $docNode -firstChild] set textNode [dom::node cget $elementNode -firstChild] puts [dom::node cget $textNode -nodeValue] --- With ActiveTcl-8.3.4.3 this returns an empty string. If I remove the -parser option, it returns the CDATA text. Unfortunately, the default parser is too buggy - I need the tcl parser to make the rest of my script work. ActiveTcl-8.4.0.1 doesn't have the -parser option (I thought it used the same Tcldom package as 8.3.4.3, but must be mistaken), and has other issues in other places which prevent my script working. Basically, I want to stick with ActiveTcl-8.3.4.3, and the tcl parser, and get the text from CDATA sections. Can I do that? -- 3:28pm up 65 days, 5:56, 2 users, load average: 0.02, 0.13, 0.09 |
From: Andreas K. <aku...@sh...> - 2002-09-13 14:19:56
|
> I'm using the latest CVS head for TclDOM as well as the latest for TclXML > and Tcl/Tk 8.4.0 . > > Today, when I attempt to build tcldom, I get this error: > > make: *** No rule to make target `@PLUG_LIBS@', needed by `binaries'. Stop. > > Even when I try a fresh configure of the package, I continue to get > this msg. fresh configure = configure from CVS, or configure generated from configure.in via autoconf ? I assume the former. You need the latter. > Can someone provide me a tip on how to get past this? There's no > configure option that is obviously related to this variable. I will get the CVS head, regenerate the configure and commit that back. -- So long, Andreas Kupries <aku...@sh...> <http://www.purl.org/NET/akupries/> Developer @ <http://www.activestate.com/> ------------------------------------------------------------------------------- |
From: Larry W. V. <lv...@ca...> - 2002-09-13 11:44:00
|
I'm using the latest CVS head for TclDOM as well as the latest for TclXML and Tcl/Tk 8.4.0 . Today, when I attempt to build tcldom, I get this error: make: *** No rule to make target `@PLUG_LIBS@', needed by `binaries'. Stop. Even when I try a fresh configure of the package, I continue to get this msg. Can someone provide me a tip on how to get past this? There's no configure option that is obviously related to this variable. -- Tcl'2002 Sept 16, 2002, Vancouver, BC http://www.tcl.tk/community/tcl2002/ Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Derek F. <fo...@hu...> - 2002-09-12 12:37:59
|
I have a DOM tree from which I want to find a particular element node, then cut that node and all its children out. I then want to reinsert the document fragment (is that the right terminology?) into the tree at a different point. I can find the node easily enough. Can someone point me in the right direction with the cutting and pasting bits? -- The past: Smart users in front of dumb terminals |
From: Steve B. <Ste...@zv...> - 2002-09-06 23:06:19
|
Derek Fountain wrote: > Given a small piece of XML like this: > > <?xml version="1.0" encoding="utf-8" standalone="no"?> > <?xml-stylesheet type="text/xsl" href="test_view.xsl"?> > <!DOCTYPE test SYSTEM "test.dtd"> > <test /> > > I serialise it using Activetcl-8.3.4.3 and tcldom-2.2 with this: > > #!/bin/sh > # \ > exec tclsh8.3 "$0" "$@" > > package require xml > package require dom > > while {[gets stdin line] != -1} { > append xml $line > } > set doc [::dom::DOMImplementation parse $xml] > puts [::dom::DOMImplementation serialize $doc] > > which prints me this: > > <?xml version='1.0'?> > <!DOCTYPE test> > <test/> > > Lots of detail has disappeared. What do I need to do to get the detail back? Please submit a bug report on SF. This will require investigation to determine whether TclXML or TclDOM is losing the data. Cheers, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Steve B. <Ste...@zv...> - 2002-09-06 23:05:21
|
Derek Fountain wrote: > I'm creating a tree from scratch, and want to get a processing instruction in > at the top. I want, for example, this: > > <?xml version="1.0"> > <?xml-stylesheet type="text/xsl" href="test_view.xsl"?> > <!DOCTYPE test SYSTEM "test.dtd"> > <test /> > > How do I get the stylesheet PI in there? I have a bit of code like this: Ouch! It doesn't fit in with what TclDOM is trying to do, which is to manage the serialisation of the DOM tree on your behalf. I think we'll need to make the DocType an explicit node. This will allow other nodes to be inserted before and after. As a workaround, I'd switch off serialising the document prologue and do that in the script by prepending to the output of the serialised document. HTHs, Steve Ball > #!/bin/sh > # \ > exec tclsh8.3 "$0" "$@" > > package require xml > package require dom > > set doc [::dom::DOMImplementation create] > set testNode [::dom::document createElement $doc "test"] > > dom::document createProcessingInstruction \ > $doc "xml-stylesheet" {type="text/xsl" href="test_view.xsl"} > > puts [::dom::DOMImplementation serialize $doc] > > which produces: > > <?xml version='1.0'?> > <!DOCTYPE test> > <test/> > > i.e. no PI at all. If I change the target node for the PI from $doc to > $testNode I get: > > <?xml version='1.0'?> > <!DOCTYPE test> > <test><?xml-stylesheet type="text/xsl" href="test_view.xsl"?></test> > > i.e. PI now serialised, but in the wrong place. > > How do I get the PI at the top where I want it? I'm using Activetcl-8.3.4.3 > with tclxml-2.2 and tclxml-2.0, and neither seem to give the result I'm after > the way I'm doing it. > -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Steve B. <Ste...@zv...> - 2002-09-06 22:43:09
|
Someone has reported the CreateDocType problem independently, so you're not alone. Please submit a SF bug report and attach the patch. I'll have to review the syntax and semantics for createDocType wrt to the DOM Level 2 spec. I'm not sure I'll be able to get this fixed as part of the v2.3 release. Cheers, Steve Derek Fountain wrote: >>::dom::DOMImplementation createDocumentType $doc "test" {} "test.dtd" >>::dom::document createElement $doc "test" >> >>puts [::dom::DOMImplementation serialize $doc] >> >>which gives an error: >> >>"wrong number of arguments, should be: DOMImplementation createDocumentType >>name publicid systemid" >> >>Looking at the code in tclxml-2.0 and 2.2, I'm a bit suspicous that >>something's not right. Do the parameters for the call to CreateDocType from >>inside dom::tcl::DOMImplementation match up with what the routine's >>expecting to receive? I'm a bit out of my depth with that sort of Tcl code, >>so apologies if I'm casting aspersions. >> >>Can someone fix my code above so I can see exactly what I've got wrong? > > > Replying to myself, which is always good form, I patched domimpl.tcl in the > 2.2 code like this: > > --- > >>diff -u domimpl.tcl.orig domimpl.tcl > > --- domimpl.tcl.orig Fri Sep 6 10:10:48 2002 > +++ domimpl.tcl Fri Sep 6 11:06:52 2002 > @@ -215,11 +215,11 @@ > createDocumentType { > # Introduced in DOM Level 2 > > - if {[llength $args] != 3} { > - return -code error "wrong number of arguments, should be: > DOMImplementation createDocumentType name publicid systemid" > + if {[llength $args] != 4} { > + return -code error "wrong number of arguments, should be: > DOMImplementation createDocumentType token name publicid systemid" > } > > - return [CreateDocType [lindex $args 0] [list [lindex $args 1] > [lindex $args 2]]] > + return [CreateDocType [lindex $args 0] [lindex $args 1] [lindex > $args 2] [lindex $args 3]] > } > > createNode { > --- > > and changed my script to contain: > > ::dom::DOMImplementation createDocumentType $doc "test" [list "" "test.dtd"] > {} > > This gives: > > <?xml version='1.0'?> > <!DOCTYPE test SYSTEM "test.dtd"> > <test/> > > which is what I expect. > > Am I getting anywhere with this, or am I just making myself look like an > idiot in public? :-} > -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Derek F. <fo...@hu...> - 2002-09-06 10:39:58
|
Given a small piece of XML like this: <?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml-stylesheet type="text/xsl" href="test_view.xsl"?> <!DOCTYPE test SYSTEM "test.dtd"> <test /> I serialise it using Activetcl-8.3.4.3 and tcldom-2.2 with this: #!/bin/sh # \ exec tclsh8.3 "$0" "$@" package require xml package require dom while {[gets stdin line] != -1} { append xml $line } set doc [::dom::DOMImplementation parse $xml] puts [::dom::DOMImplementation serialize $doc] which prints me this: <?xml version='1.0'?> <!DOCTYPE test> <test/> Lots of detail has disappeared. What do I need to do to get the detail back? -- The past: Smart users in front of dumb terminals |
From: Derek F. <fo...@hu...> - 2002-09-06 10:14:17
|
> ::dom::DOMImplementation createDocumentType $doc "test" {} "test.dtd" > ::dom::document createElement $doc "test" > > puts [::dom::DOMImplementation serialize $doc] > > which gives an error: > > "wrong number of arguments, should be: DOMImplementation createDocumentType > name publicid systemid" > > Looking at the code in tclxml-2.0 and 2.2, I'm a bit suspicous that > something's not right. Do the parameters for the call to CreateDocType from > inside dom::tcl::DOMImplementation match up with what the routine's > expecting to receive? I'm a bit out of my depth with that sort of Tcl code, > so apologies if I'm casting aspersions. > > Can someone fix my code above so I can see exactly what I've got wrong? Replying to myself, which is always good form, I patched domimpl.tcl in the 2.2 code like this: --- >diff -u domimpl.tcl.orig domimpl.tcl --- domimpl.tcl.orig Fri Sep 6 10:10:48 2002 +++ domimpl.tcl Fri Sep 6 11:06:52 2002 @@ -215,11 +215,11 @@ createDocumentType { # Introduced in DOM Level 2 - if {[llength $args] != 3} { - return -code error "wrong number of arguments, should be: DOMImplementation createDocumentType name publicid systemid" + if {[llength $args] != 4} { + return -code error "wrong number of arguments, should be: DOMImplementation createDocumentType token name publicid systemid" } - return [CreateDocType [lindex $args 0] [list [lindex $args 1] [lindex $args 2]]] + return [CreateDocType [lindex $args 0] [lindex $args 1] [lindex $args 2] [lindex $args 3]] } createNode { --- and changed my script to contain: ::dom::DOMImplementation createDocumentType $doc "test" [list "" "test.dtd"] {} This gives: <?xml version='1.0'?> <!DOCTYPE test SYSTEM "test.dtd"> <test/> which is what I expect. Am I getting anywhere with this, or am I just making myself look like an idiot in public? :-} -- The past: Smart users in front of dumb terminals |
From: Derek F. <fo...@hu...> - 2002-09-06 09:06:59
|
I've asked this before on c.l.t. and someone (Steve?) replied, but I still can't make it work 'cos I'm a nugget. I want this: <?xml version="1.0"> <!DOCTYPE test SYSTEM "test.dtd"> <test /> and have the following code to do it: #!/bin/sh # \ exec tclsh8.3 "$0" "$@" package require xml package require dom set doc [::dom::DOMImplementation create] ::dom::DOMImplementation createDocumentType $doc "test" {} "test.dtd" ::dom::document createElement $doc "test" puts [::dom::DOMImplementation serialize $doc] which gives an error: "wrong number of arguments, should be: DOMImplementation createDocumentType name publicid systemid" Looking at the code in tclxml-2.0 and 2.2, I'm a bit suspicous that something's not right. Do the parameters for the call to CreateDocType from inside dom::tcl::DOMImplementation match up with what the routine's expecting to receive? I'm a bit out of my depth with that sort of Tcl code, so apologies if I'm casting aspersions. Can someone fix my code above so I can see exactly what I've got wrong? -- The past: Smart users in front of dumb terminals |
From: Derek F. <fo...@hu...> - 2002-09-06 08:49:32
|
I'm creating a tree from scratch, and want to get a processing instruction in at the top. I want, for example, this: <?xml version="1.0"> <?xml-stylesheet type="text/xsl" href="test_view.xsl"?> <!DOCTYPE test SYSTEM "test.dtd"> <test /> How do I get the stylesheet PI in there? I have a bit of code like this: #!/bin/sh # \ exec tclsh8.3 "$0" "$@" package require xml package require dom set doc [::dom::DOMImplementation create] set testNode [::dom::document createElement $doc "test"] dom::document createProcessingInstruction \ $doc "xml-stylesheet" {type="text/xsl" href="test_view.xsl"} puts [::dom::DOMImplementation serialize $doc] which produces: <?xml version='1.0'?> <!DOCTYPE test> <test/> i.e. no PI at all. If I change the target node for the PI from $doc to $testNode I get: <?xml version='1.0'?> <!DOCTYPE test> <test><?xml-stylesheet type="text/xsl" href="test_view.xsl"?></test> i.e. PI now serialised, but in the wrong place. How do I get the PI at the top where I want it? I'm using Activetcl-8.3.4.3 with tclxml-2.2 and tclxml-2.0, and neither seem to give the result I'm after the way I'm doing it. -- The past: Smart users in front of dumb terminals |
From: Steve B. <Ste...@zv...> - 2002-09-04 22:58:12
|
Derek Fountain wrote: > Can I use createNode to insert a node just where I want one? > > I have a DOM representing this: > > <test> > <author> > Derek Fountain > </author> > </test> > > and I want this: > > <test> > <author> > Derek Fountain > </author> > <description> > Test information > </description> > </test> > > More generally, I want to insert a node as a child of a parent node based on > critera such as "make this the 2nd child element of parentNode". > > Can I do that with createNode? If not, what's the best way? The trick is making description come after the author element. The simplistic approach is 'createNode /test/description', but the new element may be before or after the author element. Ideally you'd want to be able to do something like: 'createNode /test/*[2][self::description]' But someone will have to add support to the createNode method for it to work. Otherwise, you can use the simple 'createNode /test/description' call. This returns the DOM node of the newly created element. Then use the 'appendChild' method to make sure it's at the end of the child list. For example, set node [dom::DOMImplementation createNode $doc /test/description] dom::node appendChild [dom::node parent $node] $node HTHs, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Derek F. <fo...@hu...> - 2002-09-04 13:31:31
|
Can I use createNode to insert a node just where I want one? I have a DOM representing this: <test> <author> Derek Fountain </author> </test> and I want this: <test> <author> Derek Fountain </author> <description> Test information </description> </test> More generally, I want to insert a node as a child of a parent node based on critera such as "make this the 2nd child element of parentNode". Can I do that with createNode? If not, what's the best way? -- The past: Smart users in front of dumb terminals |
From: Steve B. <Ste...@zv...> - 2002-09-02 21:46:14
|
Joe English wrote: > The Expat-based implementation (in tcldom/src, formerly known > as TclDOM-Pro) doesn't include XPath support, and probably > never will unless someone else takes the trouble to implement it. > I don't plan to -- IMO implementing XPath is more trouble than > it's worth. I wonder whether the Tcl implementation's XPath code is generalised enough to be used with a TclDOMPro DOM tree? I'd have to check to see if it only uses API calls, rather than peeking directly inside the node data structures. I'm pretty sure the createNode stuff falls into that category. This approach may apply to other features, such as events. > (Personally, I use a homegrown XML query language built on top > of TclDOM; it has most of the power of XPath, but was significantly > easier to implement). Horses for courses... Having invested the time in learning XPath, I like to leverage that investment. XPath is popping up all over the place - XSLT, XML-Query, DOM, etc. I've no doubt that it may be easier to design/implement other query languages (especially now that I've read the XPath v2.0 WD - phew!) but sticking to standards (as much as possible) is important to me. Cheers, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Steve B. <Ste...@zv...> - 2002-09-02 21:37:16
|
Derek Fountain wrote: > I notice from recent posts to this list that tcldom has some xpath support - > selectNode and createNode. I've started to rely on these as they make my > scripts much easier to write, and I'm at the point of ripping out all my DOM > walking code and replacing it with selectNode calls. > > Before I do this I ought to check: since these calls are non standard, what > is the prospect for their future? Will they get replaced with something else, > or can I assume they'll be available on all forthcoming tclxml versions for > the foreseeable future? Well, I rely on XPath too so I'm pretty keen on making sure it continues to be supported. DOM Level 3 includes interfaces for XPath, so the standard itself will support XPath. Of course, bridging the gap between DOM and XPath's data models is not trivial so it's not all smooth sailing. As with all non-standard extensions, the syntax introduced in DOM Level 3 may not (will not) match the selectNode/createNode methods (btw, at least L3 has the notion of static node lists so we don't have to worry about live lists). The usual response to that is to keep the original syntax, deprecate it but maintain the extension syntax for the forseeable future. HTHs, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: Joe E. <jen...@fl...> - 2002-09-02 16:42:26
|
Derek Fountain wrote: > I notice from recent posts to this list that tcldom has some xpath support - > selectNode and createNode. I've started to rely on these as they make my > scripts much easier to write, and I'm at the point of ripping out all my DOM > walking code and replacing it with selectNode calls. > > Before I do this I ought to check: since these calls are non standard, what > is the prospect for their future? Will they get replaced with something else, > or can I assume they'll be available on all forthcoming tclxml versions for > the foreseeable future? The Expat-based implementation (in tcldom/src, formerly known as TclDOM-Pro) doesn't include XPath support, and probably never will unless someone else takes the trouble to implement it. I don't plan to -- IMO implementing XPath is more trouble than it's worth. (Personally, I use a homegrown XML query language built on top of TclDOM; it has most of the power of XPath, but was significantly easier to implement). --Joe English jen...@fl... |
From: Derek F. <fo...@hu...> - 2002-09-02 10:04:27
|
I notice from recent posts to this list that tcldom has some xpath support - selectNode and createNode. I've started to rely on these as they make my scripts much easier to write, and I'm at the point of ripping out all my DOM walking code and replacing it with selectNode calls. Before I do this I ought to check: since these calls are non standard, what is the prospect for their future? Will they get replaced with something else, or can I assume they'll be available on all forthcoming tclxml versions for the foreseeable future? -- The past: Smart users in front of dumb terminals |
From: Derek F. <fo...@hu...> - 2002-08-28 11:21:26
|
> Use the 'insertBefore' method of the dom::node command. > HTHs, It certainly did, thanks! -- The past: Smart users in front of dumb terminals |