general-entities/entity-expansion0
<!doctype test [
<!element test - - (sub+)>
<!element sub - - (#pcdata)>
<!entity ent1 "basic parsed entity replacement text">
]>
<test><sub>&ent1;</sub></test>
general-entities/entity-expansion0
general-entities/entity-expansion1
Basic external general entity expansion (where the file
entity-expansion1-external-entity.sgm
contains the text
Basic expansion text from external parsed entity
)
general-entities/entity-expansion-on-attr0
general-entities/entity-expansion-on-attr1
general-entities/entity-expansion-on-attr2
general-entities/entity-expansion-on-attr3
Example for an external entity reference used in
an attribute value (where the file entity-expansion-on-attr3-external-entity.ent
contains the text text-to-be-fetched-into-attr
)
sgmlproc <your-file.sgm>
where <your-file.sgm> is replaced by the actual file
used for storing.
<!doctype test [
<!element test - - (sub+)>
<!element sub - - (#pcdata)>
<!entity ent1 "basic parsed entity replacement text">
]>
<test><sub>&ent1;</sub></test>
<!doctype test [
<!element test - - (sub+)>
<!element sub - - (#pcdata)>
<!entity ent1 system "entity-expansion1-external-entity.sgm">
]>
<test><sub>&ent1;</sub></test>
<!doctype test [
<!element test - - (#pcdata)>
<!attlist test att cdata #implied>
<!entity entwithquote "single quote following: '">
]>
<test att='&entwithquote'></test>
<!doctype test [
<!element test - - (#pcdata)>
<!attlist test att cdata #implied>
<!entity entwithquote 'double quote following: "'>
]>
<test att="&entwithquote"></test>
<!doctype test [
<!element test - - (#pcdata)>
<!attlist test att cdata #implied>
<!entity entwithquote 'double quote following: "'>
<!entity referencedent 'contains ref to &entwithquote;'>
]>
<test att="&referencedent;"></test>
<!doctype test [
<!element test - - (sub+)>
<!element sub - - (#pcdata)>
<!attlist sub att cdata #implied>
<!entity ent system "entity-expansion-on-attr3-external-entity.ent">
]>
<test><sub att="&ent"></sub></test>