[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Comparing PUBLIC identifiers for equality.
Alan Kennedy wrote: > o Are PUBLIC identifers guaranteed to be unique? For example, > if the PUBLIC identifier "-//W3C//DTD HTML 4.0 Transitional//EN" > is used, can different people legally use that identifier to refer > to different things? Public identifiers can be anything at all provided no illegal characters are used, so nothing can be said about them. However, *formal* public identifiers (FPIs) are defined by an ISO standard, and always begin with "+//", "ISO" or "-//". In the first two cases, they can only be defined by the owner (as given by a registry in the first case, or an ISO standard in the second case). The "-//" FPIs are technically private use, but in practice organizations do not step on one another's FPIs. The reason that "-//" is so common is that the registry for "+//" is de facto broken. > o Is there a standard structure/grammar which I can use to > decompose PUBLIC identifiers? Formal public identifiers have the form "-//orgname//type title//lang" where orgname is a plain-text organization name, type is "DTD" or various other things, "title" is a plain-text title, and lang is the ISO 639 code for the natural language in which the document described by the FPI is written. In the case of registered organizations, "-" is replaced by "+". For FPIs defined directly by ISO standards, it's "ISO nnnnn:yyyy whatever" or "ISO/IEC nnnnn:yyyy whatever". > If PUBLIC identifiers are globally unique, and always refer to the > same thing, then obviously (?) I can just do a simple string > comparison to see if they are equal. There is no guarantee that a FPI always refers to the same thing, if by "same" you mean "byte-by-byte identical". -- There is / one art || John Cowan <jcowan@r...> no more / no less || http://www.reutershealth.com to do / all things || http://www.ccil.org/~cowan with art- / lessness \\ -- Piet Hein
|
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
|