Fixes since now this applies to XUL mode and also in BM standalone mode.

This commit is contained in:
mgalli%geckonnection.com 2006-02-04 13:30:37 +00:00
Родитель dbb143b269
Коммит e33ac419ed
1 изменённых файлов: 19 добавлений и 12 удалений

Просмотреть файл

@ -86,22 +86,29 @@ bmProcessor.prototype.setTargetElement = function (targetEle) {
this.targetElement=targetEle; this.targetElement=targetEle;
} }
bmProcessor.prototype.apply = function () { bmProcessor.prototype.apply = function () {
if(this.xmlRef.getElementsByTagName("li").length<1) { if( this.xmlRef.getElementsByTagName("li").length < 1) {
this.targetDocument.getElementById("message-empty").style.display="block"; if( this.targetDocument && this.targetDocument ) {
} else { if(this.targetDocument.getElementById("message-empty")) {
if(this.xmlLoadedState&&this.xslLoadedState) { this.targetDocument.getElementById("message-empty").style.display="block";
var xsltProcessor = new XSLTProcessor();
var htmlFragment=null;
try {
xsltProcessor.importStylesheet(this.xslRef);
htmlFragment = xsltProcessor.transformToFragment(this.xmlRef, this.targetDocument);
} catch (e) {
}
this.targetElement.appendChild(htmlFragment.firstChild);
} }
// ... other checks? other formatting...
}
return;
} }
if(this.xmlLoadedState&&this.xslLoadedState) {
var xsltProcessor = new XSLTProcessor();
var htmlFragment=null;
try {
xsltProcessor.importStylesheet(this.xslRef);
htmlFragment = xsltProcessor.transformToFragment(this.xmlRef, this.targetDocument);
} catch (e) {
}
this.targetElement.appendChild(htmlFragment.firstChild);
}
} }
bmProcessor.prototype.run = function () { bmProcessor.prototype.run = function () {