зеркало из https://github.com/mozilla/pjs.git
Fix for #314163 "E4X XML object constructed from an XML Beans XmlObject is not consistent with a literal (inline) E4X XML object"
This commit is contained in:
Родитель
2e3f0807cf
Коммит
885b8b4e97
|
@ -237,6 +237,10 @@ class XML extends XMLObjectImpl
|
||||||
{
|
{
|
||||||
XScriptAnnotation anno;
|
XScriptAnnotation anno;
|
||||||
XmlCursor curs = xo.newCursor();
|
XmlCursor curs = xo.newCursor();
|
||||||
|
if (curs.currentTokenType().isStartdoc())
|
||||||
|
{
|
||||||
|
curs.toFirstContentToken();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
anno = new XScriptAnnotation(curs);
|
anno = new XScriptAnnotation(curs);
|
||||||
curs.setBookmark(anno);
|
curs.setBookmark(anno);
|
||||||
|
@ -710,7 +714,11 @@ todo need to handle namespace prefix not found in XML look for namespace type in
|
||||||
{
|
{
|
||||||
copyCurs = xo.newCursor();
|
copyCurs = xo.newCursor();
|
||||||
copyCurs.toFirstContentToken();
|
copyCurs.toFirstContentToken();
|
||||||
|
if (cursToCopy.currentTokenType() == XmlCursor.TokenType.STARTDOC)
|
||||||
|
{
|
||||||
|
cursToCopy.toNextToken();
|
||||||
|
}
|
||||||
|
|
||||||
cursToCopy.copyXml(copyCurs);
|
cursToCopy.copyXml(copyCurs);
|
||||||
if (!cursToCopy.toNextSibling()) // If element skip element.
|
if (!cursToCopy.toNextSibling()) // If element skip element.
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче