Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Parameter Entity  RSS feed

Shoba Ramachandran
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read the following in "Essential XML Quick Reference" book, section 2.5.1.
"Parameter entities may not be referenced within other declarations in the internal subset but they may be used in place of a complete declaration."
I tried the following example to test this concept and I'm allowed to reference parameter entities within other declarations. Am I missing something here?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE person [
<!ENTITY % nameDesc "<!ELEMENT name (#PCDATA)>">
<!ENTITY % literateAtt "CDATA "YES"">
<!ELEMENT person (name)>
<!ATTLIST name literate %literateAtt;>
It does not complain when I try to reference "literateAtt" entity within "ATTLIST" declaration.
Please help.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!