[OT] Using entity parameters in DTD

0 views
Skip to first unread message

Luis Miguel Morillas

unread,
Jan 16, 2012, 9:42:02 AM1/16/12
to akar...@googlegroups.com
I have got this example:

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE example [
<!ENTITY % pcd "(#PCDATA)">
<!ENTITY % rgb "(red | green | blue)">
<!ELEMENT example (spot, (%rgb;)+)>
<!ELEMENT red %pcd;>
<!ELEMENT green %pcd;>
<!ELEMENT blue %pcd;>
<!ELEMENT spot %pcd;>
<!ATTLIST spot color %rgb; #IMPLIED>
]>

<example>
<spot color="red">A red spot.</spot>
<blue>153</blue>
<green>255</green>
</example>


I can't parse with amara nor validate with xmllint, but it parses ok
if I put it as an external DTD. I can't find what's wrong in it :-/

Regards,

-- luismiguel (@lmorillas)

Uche Ogbuji

unread,
Jan 19, 2012, 11:29:39 PM1/19/12
to akar...@googlegroups.com
Oops. Sorry; I had planned to get back to this.

The internal subset is limited. There are a variety of things you can do in the external subset and *not* in the internal subset, including using parameter entities for a partial declaration.


--
You received this message because you are subscribed to the Google Groups "Akara Developers" group.
To post to this group, send email to akar...@googlegroups.com.
To unsubscribe from this group, send email to akara-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akara-dev?hl=en.




--
Uche Ogbuji                       http://uche.ogbuji.net
Weblog: http://copia.ogbuji.net
Poetry ed @TNB: http://www.thenervousbreakdown.com/author/uogbuji/
Founding Partner, Zepheira        http://zepheira.com
Linked-in: http://www.linkedin.com/in/ucheogbuji
Articles: http://uche.ogbuji.net/tech/publications/
Friendfeed: http://friendfeed.com/uche
Twitter: http://twitter.com/uogbuji
http://www.google.com/profiles/uche.ogbuji
Reply all
Reply to author
Forward
0 new messages