tags:

views:

75

answers:

1

Hi

1) FPIs can be used to identify DTD files. Since as far as I can tell, FPIs are somewhat similar to URNs in that they uniquely identify the resource ( DTD file ), then why don’t we use URNs instead of FPIs to locate DTDs? In other words, what makes FPIs more efficient in identifying DTD files?

2) I also don’t understand the usefulness of FPIs in finding referenced DTD files. Namely, the only thing XML parser “wants” from Public/System identifiers is for them to show the parser where to find referenced DTD file. Since URL does the job of locating the file superbly, why would we ever want to use FPI instead of a URL?

3) Also, how does FPI help parser to locate the referenced DTD file?

thanx

+1  A: 

The parser needs to know the FPI and how to resolve it. Typically an application would use a so-called catalog file in order to interpret the public identifier. The catalog file would basically translate the public identifier to the appropriate system identifier (URI).

See also Public Identifiers, System Identifiers, and Catalog Files

An FPI must be globally unique while a system identifier can potentially be globally unique if it uses a URL or URI. Since a system identifier can also use a file-system path or relative URL/URI specifier, it cannot guarantee global uniqueness of the resource it identifies in some context.

IMHO, this is only relevant for standards development. For normal application development, system identifiers are sufficient.

VoidPointer
But how do we make sure that all Catalog files translate particular public identifier to the same URI ( I assume Catalog files usually translate FPIs to URLs and not to URNs, since URNs don't locate the resources )?
SourceC
I don't know of any other way than using files with 'correct' information. It's a bit of a hen-and-egg thing, really.
VoidPointer
thank you for your help
SourceC