[DDI-SRG] Prefixes in XML, or no Prefixes?
J Gager
j.b.gager at gmail.com
Thu Aug 21 14:37:45 EDT 2008
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.
--
Matthew Richardson, ICPSR
matvey at icpsr.umich.edu
734.615.7901
"Oh, what a world of profit and delight,
Of power, of honor, of omnipotence,
Is promised to the studious artisan!"
-- The Tragical History of Dr. Faustus, Christopher Marlowe
More information about the DDI-SRG
mailing list