[DDI-SRG] Prefixes in XML, or no Prefixes?

Pascal Heus pascal.heus at gmail.com
Wed Aug 27 17:39:31 EDT 2008


Matthew:
the DDI 3 documentation I believe also provides a list of recommended 
prefixes (though you'll likely see some variations).
*P

J Gager wrote:
> Prefixes are not just for display, but can vary from instance to instance. The purpose of the prefix is to specify the namespace of an element with fewer characters. So in your XSLT, you can use whatever prefix you want per namespace and the processor will match the instance prefixes to your XSLT prefixes.
>
> -----Original Message-----
> From: Matthew Richardson <matvey at isr.umich.edu>
> Sent: Thursday, August 21, 2008 2:17 PM
> To: ddi-srg at icpsr.umich.edu
> Subject: [DDI-SRG] Prefixes in XML, or no Prefixes?
>
> As I've been building stylesheets for DDI3, I've noticed that I seem to get
> two flavors of XML. Some of the files have namespace prefixes; some do not.
>
> I've attached examples of both.
>
> Both instances are perfectly valid. One leaves out the prefixes entirely.
> Either way, the XSLT has to spell out prefixes for the various namespaces,
> but they don't appear to be necessary in the XML.
>
> Are these namespace prefixes really just an artifact of display? I.e., are
> they really only necessary in XSLT and in other applications, or is there a
> good reason for including them in the XML?
>
> Any advice you can give on this issue is greatly appreciated.
>
>   



More information about the DDI-SRG mailing list