T
the.computational biologist
hi all - this is a pretty newbie question, so sorry if it's easily
found (though i've searched for a while and can't find a definitive
answer)...
i have a DTD (doctype), say A:
<!DOCTYPE my_container [
<!ELEMENT my_container (my_parent_item)>
<!ELEMENT my_parent_item (my_child_item)>
<!ELEMENT my_child_item (EMPTY)>
]>
now i'd like to have an example of this container as (something like):
<!DOCTYPE my_container SYSTEM "my_container.dtd" [
<!ENTITY include_file SYSTEM "my_parent_item.xml">
]>
<my_container>&include_file;</my_container>
the problem is, i'd like this "my_parent_item.xml" file to be "stand-
alone" in the sense that it will have it's own DTD, with a DOCTYPE of
my_parent_item (i.e. i don't expect the my_parent_item to have to know
that it may be inside a my_container).
furthermore, the my_parent_item DOCTYPE definition may provide
additional features about the my_parent_item object that my_container
didn't know about (e.g. maybe a "name" attribute).
when a validator processes the &include_file; entity, will i wind up
with an error due to multiple DOCTYPE declarations (i.e. will most
validators try to read the DOCTYPE of an *included* XML file)?
thanks for any insight into this, and even some links in the right
direction with such an example would be wonderfully appreciated.
cheers!
found (though i've searched for a while and can't find a definitive
answer)...
i have a DTD (doctype), say A:
<!DOCTYPE my_container [
<!ELEMENT my_container (my_parent_item)>
<!ELEMENT my_parent_item (my_child_item)>
<!ELEMENT my_child_item (EMPTY)>
]>
now i'd like to have an example of this container as (something like):
<!DOCTYPE my_container SYSTEM "my_container.dtd" [
<!ENTITY include_file SYSTEM "my_parent_item.xml">
]>
<my_container>&include_file;</my_container>
the problem is, i'd like this "my_parent_item.xml" file to be "stand-
alone" in the sense that it will have it's own DTD, with a DOCTYPE of
my_parent_item (i.e. i don't expect the my_parent_item to have to know
that it may be inside a my_container).
furthermore, the my_parent_item DOCTYPE definition may provide
additional features about the my_parent_item object that my_container
didn't know about (e.g. maybe a "name" attribute).
when a validator processes the &include_file; entity, will i wind up
with an error due to multiple DOCTYPE declarations (i.e. will most
validators try to read the DOCTYPE of an *included* XML file)?
thanks for any insight into this, and even some links in the right
direction with such an example would be wonderfully appreciated.
cheers!