Sign In/My Account | View Cart  
advertisement

Article:
 Normalizing XML, Part 2
Subject: why the namespace in ?
Date: 2003-10-30 16:51:24
From: Jiho Han

I'm a little lost with the whole namespace thing.
In Listing2.xml, the realtor elements inside HousingUnit elements are qualified with xmlns:h="http://www.mybigrealtyco.com/WS/Housing". Also RealtorList element is qualified with the same namespace URI. Why is that?


Aren't these elements all defined in the same schema?


Previous Message Previous Message   Next Message No Next Message


Titles Only Titles Only Newest First
  • Author's reply
    2003-11-05 12:24:19 Will Provost

    No, you're right -- the xmlns:h bits are pointless. Sorry to have left them in, as they're a bit misleading. (I created Listing2.xml using an XSLT tool that generated these extra declarations and failed to notice them before posting the code.) Since everything is using the default namespace declaration at the root anyway, the document is valid, but the declarations could be removed.



Sponsored By: