From: Steve B. <Ste...@zv...> - 2001-06-17 01:29:23
|
Cameron Laird wrote: > What puzzles me, though, is that I see in the WSDL world, > for example, > <?xml version='1.0'> > <!-- what happened to the DOCTYPE? --> > <wsdl:definitions xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'> > ... > </wsdl:definitions> > What is *that*? Is there some name for version-element-plus- > serialized-document? Is there a clever way to generate it? That's an XML Namespace declaration. DOM Level 2 supports XML Namespaces, and TclDOM v2.0 includes (partial) support for DOM Level 2. Support for XML Namespaces is part of TclDOM v2. BTW, the Document Type Declaration is not required (it's optional in XML anyway). XML Namespaces do not mix at all with DTDs so it's pretty pointless having a Doc Type Declaration when the document is using XML Namespaces. > Quite-unrelated question: has anyone written > WSDL::pretty_print node > to supplement > WSDL::serialize node > ? The former would, I imagine, indent elements proportionally > to their depth, and perhaps prettify attribute punctuation, and > so on. Would such a thing interest anyone else, if I write it? Again, see the '-indent' option of the serialize method. Cheers, Steve Ball -- Steve Ball | waX Me Lyrical XML Editor | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL 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 |