1 Reply Latest reply on Dec 4, 2007 3:54 AM by kcell

    Braindead XML exception: TypeError:  #1083:

    lw1001
      I'm trying to compose a large, complex xml document.

      The document *must* use a particular namespace in order to be loaded and processed by a third party app (Excel). Here's a valid snippit:

      <Cell ss:StyleID="s22"><Data ss:Type="String">Start date</Data></Cell>

      The meaning of ss is defined at the beginning the document but if I try to assemble the document from pieces, then a runtime exception is thrown - TypeError: Error #1083: The prefix "ss" for element "ss:Type" is not bound. - because the namespace is checked in the pieces before the full document is assembled.

      The only work-arounds I've found is to either build the whole thing in one shot as a single document, or copy the namespace definition into each component, which makes the document about twice as large as it needs to be. This would seem to defeat the purpose of XML functions such as appendChild that are designed to allow the document to be composed gradually.

      I can't believe that it could really be designed to work this way so I'm hopeful that someone will *please* point out what I'm missing.