This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DTD and entities


On Wed, Aug 07, 2002 at 11:58:32AM +0400, Vitaly Ostanin wrote:
> Hello!
> 
> 1.
> DTD for DocBook/XML have PUBLIC "-//OASIS//DTD DocBook XML 
> V4.1.2//EN". Please, tell me, for what "//EN" at end of string ?
> 
> It's language declaration? Where I can to read about it ?

Yes, it is a language declaration. One place you can read more
about it is:
http://www.cimi.org/public_docs/tagging_guide/tg5-8.htm
 
> 2.
> I want to declare entities in separate file.
> Can I describe "encoding" in file with entities like
> 
> <?xml version="1.0" encoding="cp1251"?>
> <!ENTITY ... >
> <!ENTITY ... >
> ?
> 
> If yes, then file with entities is not well-formed XML ?

Yes, you can do that.  See production rule [79] in the W3C
XML Recommendation, section 4.3.2, which describes
Well-Formed Parsed Entities, including external parameter
entities.  The external file can optionally include a
TextDecl (production rule 77) which includes the encoding
declaration.  

You might notice the spec makes a distinction between
an 'XMLDecl' (rule [23]) which requires the version and accepts
an encoding and standalone declarations, and a 'TextDecl'
which requires an encoding and accepts a version
declaration.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]