Subject: Re: localizing XML/XSLT with entities? From: "John E. Simpson" <simpson@xxxxxxxxxxx> Date: Sat, 05 Feb 2000 08:55:29 -0500 |
Simply put, Mozilla uses XML entities to reference what C++/GUI coders and Java codes would refer to as resources or ResourceBundles.
Thus, instead of writing something like
they write Then, all of the locale specific content it put into ENTITY declarations in an external DTD located via a chrome:// URI that fetches the DTD from the appropriate directory. What confuses me, is if the XUL document already has a !DOCTYPE declaration referencing the XUL DTD, is it legal to reference a second external DTD? Is there a legal way for DTD's to include another DTD or a bunch of entity declarations? Or, for a document to reference multiple DTD's at once? I know you can use external entities in the main document, but ideally, you would like to separate all the entity declarations into an external file making it easy to edit locale specific content in a single location without mucking with the main document DTD. I suppose you could use xsl:include/import and load up a whole bunch of statements to get the same effect, but the syntax for referencing variables isn't quite as nice as entities, and sometimes the source XML document needs localization. -Ray
<!ENTITY % draft 'INCLUDE' > <!ENTITY % final 'IGNORE' >
<![%draft;[ <!ELEMENT book (comments*, title, body, supplements?)> ]]> <![%final;[ <!ELEMENT book (title, body, supplements?)> ]]>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
localizing XML/XSLT with entities?, Ray Cromwell | Thread | XSL and IE5, Mick |
XSL and IE5, Mick | Date | RE: Style Matters - A class act, Didier PH Martin |
Month |