Re: urk, simple question, testing for #PCDATA

Subject: Re: urk, simple question, testing for #PCDATA
From: Vivek Agrawala <vivek@xxxxxxxxxxxxxxx>
Date: Mon, 07 Jul 1997 10:13:01 -0400
Norman Walsh wrote:

> I'm on the road and away from my DSSSL spec.  How can I test if
> the content of an element is just #PCDATA?  (Consider the ENTRY
> element in DocBook, for example, which can contain either block
> level elements or #PCDATA.)

How about something like:

  (node-list-empty? (children snl))

If you also want to check for non-empty #PCDATA, then you could
add a test like this:
  (> 0 (string-length (data snl)))

-- Vivek Agrawala
Siemens Corporate Research, Inc.	email: vivek@xxxxxxxxxxxxxxx

 DSSSList info and archive:

Current Thread