Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

Online

À la maison Codes sources E-Livres Téléchargements Nous contacter Au sujet de nous

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting


XSLT sur le client

Next Next





XSLT - Sur le client

Si vos appuis XSLT de navigateur peuvent être employés pour transformer les documents à XHTML dans votre navigateur.



Javascript : Une solution

Dans le chapitre précédent nous avons expliqué comment XSLT peut être employé pour transformer un document de XML à XHTML. Nous avons fait ceci en ajoutant une feuille de modèle de XSL au dossier de XML et avons laissé le navigateur faire les transformations.
Même si ceci fonctionne très bien, il n'est pas toujours souhaitable d'inclure une référence de feuille de modèle dans un dossier de XML

Une solution plus souple serait d'employer un Javascript pour faire les transformations.

En employant un Javascript, nous pouvons :

faire l'essai navigateur-spécifique
employer les différentes feuilles de modèle selon le navigateur et les besoins d'utilisateur
C'est la beauté de XSLT ! Un des buts de conception pour le XSLT était de permettre pour transformer des données d'un format à l'autre, différents navigateurs de support et différents besoins d'utilisateur.

La transformation de XSLT du côté de client est liée pour être une partie des navigateurs que le travail chargent à l'avenir, car nous verrons une croissance sur le marché spécialisé de navigateur (Braille, navigateurs auditifs, imprimeurs de Web, dispositifs tenus dans la main, etc.)




Dossier de XML et dossier de XSL
Regarder le document de XML que vous avez vu dans le chapitre précédent :

<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<store>
<book>XSLT</book>
<price>$15</price>
<country>USA</country>
<company>wrox</company>
<year>2001</year>
</store>
.
.
.
</catalog>


Feuille de modèle de XSL :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<h2>Book Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Book</th>
<th align="left">Price</th>
</tr>
<xsl:for-each select="catalog/store">
<tr>
<td><xsl:value-of select="Book" /></td>
<td><xsl:value-of select="Price" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet>


Noter le dossier de XML n'a pas la référence au dossier de XSL.

L'exemple ci-dessus indiquent qu'un dossier de XML pourrait être transformé en utilisant beaucoup de différentes feuilles de modèle de XSL.




Transformation de XML à XHTML
Voici le code source requis transforme le dossier de XML à XHTML sur le client :

<html>
<body><script type="text/javascript">// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("cdcatalog.xml")// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("cdcatalog.xsl")// Transform
document.write(xml.transformNode(xsl))</script></body>
</html>


La première partie du code créent un exemple de l'analyseur de Microsoft XML (XMLDOM), et des charges le dossier de XML dans la mémoire. La deuxième partie du code créent un autre exemple de l'analyseur et des charges le dossier de XSL dans la mémoire. La dernière ligne du code transforment le document de XML en utilisant le document de XSL, et des affichages le résultat comme XHTML dans votre navigateur. Nice !







Next Next

Keywords xslt-on-client, asp net xslt, web services client, xml on client, open source client


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizes
Oracle Quiz
MySQL Quiz
Operating System Quizes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizes
Testing Quiz
Firewalls Quiz
SAP Module Quizes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizes
Corba Quiz
Networking Quiz
Microsoft Office Quizes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizes
Financial Accounting Quiz
Managerial Accounting Quiz

Privacy Policy
Copyright © 2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved.