Hi guys,
This below is my code:
<script language="javascript" type="text/javascript">
function bc () {
var bc = document.getElementsByTagName("BusinessCard");
for (var i=0; i < bc.length; i++) {
var create_card = document.createElement("div");
create_card.setAttribute("class" , "BusinessCard" );
create_card.setAttribute("className" , "BusinessCard" );
document.getElementsByTagName("body")[0].appendChild(create_card);
}
}
</script>
</head>
<body onload="bc()" >
<BusinessCard>
<Name>Somebody Somewhere</Name>
<phone numba="primary" type="mobile">1234-4321</phone>
<phone type="work">555-3000</phone>
<phone type="fax">777-1234</phone>
<email>me@you.com</email>
</BusinessCard>
</body>
It works just fine in *.html but in .xslt it gives me:
SAXParseException: Expected an element name (DOMIII.xsl, line 15, column 22)
What my code says is:
Some xml business cards and DOM reference of these objects returns me an array and by using loop I'm creating a div for each BC giving it a class attr and creating it as a real DOM node.
Any suggestions why am I facing this error in XSLT?
Thanks