So, if there are groups like "goober" and "blurch" and "frang", each having a separate "alias" to the "real xmldb.cgi" script, and each having a distinct xml structure, is it the case that all "goober" records have the same structure, and all "blurch" records share some other structure, etc?
If that's the case, then I think a single DTD file per group would be best. And when you use your main script to access ALL groups, I would expect that you just need to create a new Twig object for each group, and access the DTD for that group to know about its structure. (You shouldn't need to add structure to the XML data in order to describe the structure, though perhaps this might not be a bad idea -- assuming it's done consistently across all groups/records so that they all have something useful in common, regardless of anything else.)
The only way it would make sense to have the DTD included with every record is if every record could potentially have a different structure, regardless of what group it's in. (For that matter, I wonder about needing DTD's at all -- I thought the one of the design goals of XML was to make the markup parseable without requiring any "ad hoc" DTD a priori -- in contrast to the more cumbersome SGML.)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.