Is this valid DTD?
Posted: Tue Apr 10, 2007 5:33 pm
The DOM functions spit errors when I try to declare a CDATA element. I'm a bit rusty on this stuff but I can swear, even when looking this up again, that this is valid:
It only does it if I put #CDATA there. #PCDATA works fine 
EDIT | Just FYI, I'm trying to write a custom wiki-type language using XML, which I want to convert to XHTML using XSLT but this is causing me more headaches than it's worth so I may just do some impressive regex parsing (yuck, slow, memory exhaustive).
Code: Select all
<!ELEMENT example (#CDATA)>Have I got it wrong or is the DOM extension badly implemented?Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: ContentDecl : Name or '(' expected in Entity, line: 3 in /Users/d11wtq/public_html/swift-www/apps/website/modules/docs/actions/actions.class.php on line 66
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: expected '>' in Entity, line: 3 in /Users/d11wtq/public_html/swift-www/apps/website/modules/docs/actions/actions.class.php on line 66
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: internal errorDOCTYPE improperly terminated in Entity, line: 3 in /Users/d11wtq/public_html/swift-www/apps/website/modules/docs/actions/actions.class.php on line 66
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Start tag expected, '<' not found in Entity, line: 3 in /Users/d11wtq/public_html/swift-www/apps/website/modules/docs/actions/actions.class.php on line 66
EDIT | Just FYI, I'm trying to write a custom wiki-type language using XML, which I want to convert to XHTML using XSLT but this is causing me more headaches than it's worth so I may just do some impressive regex parsing (yuck, slow, memory exhaustive).