2013-06-14 2 views
0

Я не знаю, почему Firefox добавляет xmlns = "" в мои xml-элементы Вот мой базовый xml-документ. Я хотел бы, в JavaScript, чтобы добавить отношенияПредотвращение добавления Firefox xmlns = "" в Javascript

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> 
    <Relationship Id="rId8" Target="endnotes.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"/> 
    <Relationship Id="rId13" Target="footer1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"/> 
    <Relationship Id="rId3" Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"/> 
    <Relationship Id="rId7" Target="footnotes.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"/> 
    <Relationship Id="rId12" Target="header1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"/> 
    <Relationship Id="rId2" Target="numbering.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"/> 
    <Relationship Id="rId1" Target="../customXml/item1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"/> 
    <Relationship Id="rId6" Target="webSettings.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"/> 
    <Relationship Id="rId11" Target="media/image3.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"/> 
    <Relationship Id="rId5" Target="settings.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"/> 
    <Relationship Id="rId15" Target="theme/theme1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"/> 
    <Relationship Id="rId10" Target="media/image2.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"/> 
    <Relationship Id="rId4" Target="stylesWithEffects.xml" Type="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects"/> 
    <Relationship Id="rId9" Target="media/image1.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"/> 
    <Relationship Id="rId14" Target="fontTable.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"/> 
</Relationships> 

код отлично работает в Chrome, но добавляет Xmlns = "" как атрибут Отношения в Firefox:

http://jsfiddle.net/USLFs/2/

Я нашел здесь Stackoverflow question, что он, вероятно, связан с тем, что я должен установить одно и то же пространство имен для дочернего элемента как для корневого элемента.

Заранее спасибо

ответ

0

я не есть способ, чтобы удалить это поведение из Firefox, для использования регулярного выражения или строки замены, за исключением.

Смежные вопросы