Hello;
Either I am totally missing something or your and Kevin's emails contradict
each other. My original question was:
start =====>
This concerns Excel's SpreadsheetML format and how Excel writes it. Excel
saves an xml file as follows:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>
...
While XmlTextWriter (the way I am calling it) creates the following:
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<o:CustomDocumentProperties>
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</o:CustomDocumentProperties>
...
Isn't o:CustomDocumentProperties the same thing as CustomDocumentProperties
xmlns="urn:schemas-microsoft-com:office:office"?
And if so, why does Excel include the xmlns, especially as it only does it
for a couple of nodes?
<=====end
Kevin said in the above "o:CustomDocumentProperties is in the namespace
"urn:schemas-microsoft-com:office:office", while CustomDocumentProperties
is in the default namespace "urn:schemas-microsoft-com:office:spreadsheet"."
But I believe you are saying:
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
"<CustomDocumentProperties> is in the namespace
urn:schemas-microsoft-com:office:office"
What am I missing here?
--
thanks - dave
"Martin Honnen" wrote:
David Thielen wrote:
Does this mean:
<CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<WindwardReports dt:dt="string">Version: 4.0.12</WindwardReports>
</CustomDocumentProperties>
That CustomDocumentProperties is in the default namespace and
WindwardReports is in the namespace urn:schemas-microsoft-com:office:off
because the xmlns="urn:schemas-microsoft-com:office:office" means that is now
the default namespace for any children of CustomDocumentProperties - but not
for CustomDocumentProperties itself?
No, with that markup as above the root element
<CustomDocumentProperties> is in the namespace
urn:schemas-microsoft-com:office:office and its child element
<WindwardReports> is in that namespace as well.
But the whole snippet lacks a binding for the prefix dt so it is not
well-formed XML with namespaces.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/