W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: splitText()

From: David Brownell <david-b@pacbell.net>
Date: Wed, 03 Nov 1999 13:22:02 -0800
Message-ID: <3820A77A.E09A18C2@pacbell.net>
To: keshlam@us.ibm.com
Cc: "L. David Baron" <dbaron@fas.harvard.edu>, www-dom@w3.org
keshlam@us.ibm.com wrote:
> 
> Given that we've now moved splitText down to characterData

Hmm, that'd be in a non-public draft; the latest DOM L2 has
only Text.splitText().  It doesn't move that method "up" (!)
in the hierarchy.  What was the rationale for that change?


Re the original question (does splitting a CDATA node
make a new text node or a new CDATA node), that also
calls to mind few more questions:

	Document.createCDATASection ("]]>");
	Document.createComment ("--");

Those examples -- and countless related ones where the
offending string has other characters before or after
it, possibly including those strings -- would appear to
create DOM documents which violate basic XML syntax.
Ditto appending such text to a CDATA section or comment
(or appending "-" to a comment ending in "-", etc).

But those createXXX() methods don't have ways to report
any exceptions.  Shouldn't L2 stipulate that such calls
report some sort of DOMException?

- Dave
Received on Wednesday, 3 November 1999 16:22:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT