Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 5th, 2006, 09:55 AM
Toxician
Guest
 
Posts: n/a
Default hello, newb question about xslt

why can i use javascrtip to output the file below into html
and also able to use xslt to do the same thing ???

xml.xml
<root>
<node>This is a node </node>
<root>

************************
xml.js

var doc=new activeobject("ms.xmldom");
doc.load (xml.xml);
doc.writeln(doc.nodename);
doc.writeln(doc.firstchild);
************************

************************
xml.xsl
<xsl:stylesheet ..etc..>
<xsl:template match='root'>
<body><xsl:valueof select="child"/></body>
</xsl:template>
</xsl:stylesheet>
************************

Please tel me the differnce i just leanr the basic transform, pleaee...

  #2  
Old December 15th, 2006, 07:35 AM
Aray
Guest
 
Posts: n/a
Default Re: hello, newb question about xslt



--

"Toxician" <fridgechemistry@yahoo.com????
news:1165314090.051068.216970@n67g2000cwd.googlegr oups.com...
Quote:
why can i use javascrtip to output the file below into html
and also able to use xslt to do the same thing ???
>
xml.xml
<root>
<node>This is a node </node>
<root>
>
************************
xml.js
>
var doc=new activeobject("ms.xmldom");
doc.load (xml.xml);
doc.writeln(doc.nodename);
doc.writeln(doc.firstchild);
************************
>
************************
xml.xsl
<xsl:stylesheet ..etc..>
<xsl:template match='root'>
<body><xsl:valueof select="child"/></body>
</xsl:template>
</xsl:stylesheet>
************************
>
Please tel me the differnce i just leanr the basic transform, pleaee...
>
They are 2 diffrent ways. though theie distination are same.

Using JavaScript, The Client must support JavaScript. Using XSLT, the Client
must support XSLT.

JavaScript is a programLanguage, It can do much more things. XSLT is live
for XML transforming.

XSLT is much easy to use than JavaScript to trnsform XML.


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles