[xml] Defaults for #PCDATA elements


I'm creating an application that uses libxml2 and gdome2 to edit a DOM document. I would like to be able to fill in a default value when a user creates a new attribute or #PCDATA element. For the attributes I use the default value that has been specified in the DTD. However, I could not find a way to specify a default value of a #PCDATA element.

Is it possible to specify a default for #PCDATA elements in a DTD? If not, would it be a solution to use XML Schemas instead of a DTD?

If possible I want to continue using libxml2 and gdome2, so it is very much appreciated if you know of a solution that works with these libraries.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]