How do XML NameSpace aware processors react to NS definations?

Amit Rekhi amitr at abinfosys.com
Mon Nov 16 16:31:18 GMT 1998


Ronald,

>The namespace URL does not signify anything at all.  It is not a directory,
schema file, >or anything else.  *All* it is is a unique identifier that
identifies the namespace.  The >prefix is a convenient shorthand for the
full URL, nothing more.

If the NameSpace URI is nothing more than a unique identifier then what kind
of  namespace processing do namespace aware XML processors do?
for eg. If I have a sample XML file :-

<?xml version="1.0"?>
<Root xmlns:ContentCheck="http://www.my.org/checkdirectory">
 <ContentCheck:Alpha>Test Data</ContentCheck:Alpha>
</Root>

 * How would the namespace aware XML processor react when it encounters
the statement
<Root xmlns:ContentCheck="http://www.my.org/checkdirectory"> and then
the element
<ContentCheck:Alpha>?

* Is the following processing flow for XML NameSpace
processing correct and sufficient ?

  1)The XML NS aware processor will check for ':' in the element names
      of XML file
  2) When it finds one (as is in <ContentCheck:Alpha>) it would look for
     the xmlns declaration for the prefix encountered
  3) On not finding the xmlns declaration it would flag an error
      then proceed to 5)
  4) On finding it do nothing and proceed to 5)
  5) The processor would go back to step 1) for the next element
      encountered

   * Am I right in saying that whatever the namespace URI signifies
      is for the application to know not for the XML processor?
      for eg. if I have an XML file

<xsl:stylesheet xmlns:xsl="http://www.w3c.org/TR/WD-xsl">
  <xsl:template> some text </xsl:template>
</xsl:stylesheet>

* Then it is for the application (XSL processor) to know what
"http://www.w3c.org/TR/WD-xsl "  stands  for, not the XML processor.
Am I right?

* It is upto the application , to validate
the element names prefixed with "xsl" against their definations ,
which are stored in the XSL DTD at  "http://www.w3c.org/TR/WD-xsl "
Am I correct?



                    Thanks for any help,


Regards,

AMIT


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list