kesh...@us.ibm.com wrote on 12/16/2008 04:48:05 PM: > As far as XPath/XSLT is concerned, there is no such thing as "an > empty text node" -- if it's empty, it's absent. So the Xalan > serializer will almost certainly treat empty text nodes as not > existing. Any properly written XML application should treat <foo/> > and <foo></foo> as IDENTICAL. If you really need to draw this > distinction, your output isn't XML.
It seems that Ian has no choice. A defective parser is apparently on the receiving end that he cannot change. He understands that <foo/> and <foo></foo> has the same meaning, but needs the latter as a workaround. > Maybe your output is HTML. If so, setting the serializer to HTML > mode will generate separate start and end tags rather than an empty- > element tag. But that has other effects as well, which may or may > not be things you want if the document is some SGML language other than HTML. > > ______________________________________ > "... Three things see no end: A loop with exit code done wrong, > A semaphore untested, And the change that comes along. ..." > -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff. > org/pegasus/songs/threes-rev-11.html) Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org