Re: localizing XML/XSLT with entities?
Simply put, Mozilla uses XML entities to reference what C++/GUI coders and Java codes would refer to as resources or ResourceBundles.
I don't know what the Mozilla code looks like; your mailer seems to have stripped out anything that looks like markup. But it sounds like they're using INCLUDE/EXCLUDE "conditional" sections in the DTD, together with external parameter entities for incorporating other DTDs which, yes, is a legal and (not always, but sometimes!) useful approach.
An example in the XML Rec. [3.4]:
<!ENTITY % draft 'INCLUDE' > <!ENTITY % final 'IGNORE' >
<![%draft;[ <!ELEMENT book (comments*, title, body, supplements?)> ]]> <![%final;[ <!ELEMENT book (title, body, supplements?)> ]]>
The PEs in the first two lines tell the DTD that in its current pass, the processor should include the declaration of the book element performed by the %draft; PE, and *not* include that performed by the %final; PE. If you want the processing to treat the book element as though it declares a "final version's" content model, just switch the INCLUDE/IGNORE values of the two PEs.
(Further discussion along these lines probably should move off-list, or to XML-L or XML-DEV.)
John E. Simpson | My girlfriend asked me, "Did you sleep
simpson@xxxxxxxxxxx | good?" I said, "No, I made a few
http://www.flixml.org | mistakes." (Stephen Wright)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format