Bookmark sensitive to empty case. Triggers Warning message and does not process via XSLT.

This commit is contained in:
mgalli%geckonnection.com 2005-12-22 22:25:26 +00:00
Родитель a9a0f1c1b2
Коммит bfb6e397e6
1 изменённых файлов: 14 добавлений и 10 удалений

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

@ -74,17 +74,21 @@ bmProcessor.prototype.setTargetElement = function (targetEle) {
}
bmProcessor.prototype.apply = function () {
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) {
}
if(this.xmlRef.getElementsByTagName("li").length<1) {
this.targetDocument.getElementById("message-empty").style.display="block";
} else {
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 () {