You are on page 1of 26

‫مدخل إىل اإلكس ‪-‬أم‪-‬أل‬

‫)‪(XML , DTD ,CSS, XSL‬‬

‫‪2‬‬
:‫كتب للمؤلف‬

Csharp

NotePad

3
‫حملة عن الكاتب‬

0673-07-51-05

18/05/1989

VB.NET, C#.NET, C++, C, JAVA(J2EE)

ASP.NET, PHP, HTML, JAVASCRIPT, AJAX, CSS, JQUERY, XML

MS ACCESS, MS SQL SERVER, MYSQL

4
XML

XSL DTD XML

HTML

5
‫"يا أيها الرين آمنوا اتقوا اهلل و قولوا‬
‫قوال سديدا‪ .‬يصلح لكم أعمالكم و يغفس لكم‬
‫ذنوبكم ومن يطع اهلل و زسوله فقد فاش‬
‫فوشا عظيما"‬

‫األحزاب ‪ 70 :‬و ‪71‬‬

‫‪6‬‬
‫للمراسلة مو أجل طرح اإلقرتاحات واملالحظات‬
‫والتساؤالت نقدم لكم عهوانها اإللكرتوني ‪:‬‬

‫‪Khalid_ESSAADANI@Hotmail.fr‬‬

‫بسم اهلل على بركة اهلل‬

‫‪7‬‬
Extensible Marquap Language XML

HTML

xml Tag Balise

:HTML
<center> Ce texte sera affiché dans le centre </center>

HTML xml

XML

XML

Windows Bloc Note XML

XML XML

8
Vente Database

Article


vente ‫قاعدة البيانات‬

Code Article Libelle Article


1 Clavier
2 Souris

9
xml

<?xml version="1.0"?>
<vente>
<articles>
<article>
<code>1</code>
<libelle>clavier</libelle>
</article>
<article>
<code>2</code>
<libelle>Souris</libelle>
</article>
</articles>
</vente>

xml

Les balises

< &

 & &amp
 < &lt;
 > &gt;
 ' &apos;
 " &quot;

10
<code> 3>2 </code>

<code> 3&gt;2 </code>

XML

<?xml version="1.0"?>
<vente>
<articles>
<article code="1">
<libelle>clavier</libelle>
</article>
<article code="2">
<libelle/>
</article>
</articles>
</vente>

XML

vente

Articles

11
Attribut <article code="1">
HTML

<font color="Red"> Ce texte sera coloré en rouge </font>

<libelle/>

<libelle><libelle/>

XML

Commentaires/Comments

12
<!--‫هذا عبارة عن تعليق‬-->

DTD

xml DTD

XML XML DTD

XML DTD

Externe Interne DTD

DTD 1

xml

<!DOCTYPE Racine [

Liste des éléments.

]>

13
Racine

XML DTD

1. <?xml version="1.0"?>
2. <!DOCTYPE vente[
3. <!ELEMENT vente (articles)>
4. <!ELEMENT articles ( article+)>
5. <!ELEMENT article (code,libelle)>
6. <!ELEMENT code (#PCDATA)>
7. <!ELEMENT libelle (#PCDATA)>
8. ]>
<vente>
<articles>
<article>
<code>1</code>
<libelle>clavier</libelle>
</article>
<article>
<code>2</code>
<libelle>Souris</libelle>
</article>
</articles>
</vente>

DTD

14
(code,libelle) and ,
(code | libelle) or |
(code , libelle?) ?
(code,libelle+)

(code, libelle*)

<!ELEMENT code (#PCDATA)>

code

DTD 2

DTD

<!DOCTYPE vente[
]>

.DTD

<?xml version="1.0"?>
<!ELEMENT vente (articles)>
<!ELEMENT articles ( article+)>
<!ELEMENT article (code,libelle)>
<!ELEMENT code (#PCDATA)>
<!ELEMENT libelle (#PCDATA)
>

15
XML

<?xml version="1.0"?>
<!DOCTYPE vente SYSTEM "fichier.dtd">
<vente>
<articles>
<article>
<code>1</code>
<libelle>clavier</libelle>
</article>
<article>
<code>2</code>
<libelle>Souris</libelle>
</article>
</articles>
</vente>

DTD fichier.dtd vente

DTD XML DTD

CSS XML

!!!!  XML

XSL CSS XML

HTML CSS (Cascading Style Sheets)

XML CSS

16
code
{
background-color: Yellow;
display: block;
color:Blue;
font-family:Comic Sans MS;
font-style:italic;
}
libelle
{
display: block;
color:Green;
font-family:Calibri;
text-decoration:underline;
}

libelle code

XML .CSS

<?xml version="1.0"?>
<?xml-stylesheet href="css.css" type="text/css"?>
<!DOCTYPE vente SYSTEM "ok.dtd">
<vente>
<articles>
<article>
<code>1</code>
<libelle>clavier</libelle>
</article>
<article>
<code>2</code>
<libelle>Souris</libelle>
</article>
</articles>
</vente>

XML

17
CSS

18
XSL XML

CSS XML CSS XSL

HTML XML

XML XSL

XSL

>?"xml version="1.0?<
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<h3>Liste des articles</h3>
<table border="1" width="100%">
<tr bgcolor="yellow">
<td>Code</td>
<td>Libelle</td>
</tr>
<xsl:for-each select="vente/articles/article">
<tr>
<td>
<xsl:value-of select="code"/>
</td>
<td>
<xsl:value-of select="libelle"/>
</td>
</tr>
</xsl:for-each>
</table>
<br/>
<br/>
<br/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

19
<?xml version="1.0"?>

XML XSL

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

XSL XSL

Namespace xmlns:xsl

<xsl:template match="/">

xml / match

HTML

<xsl:for-each select="vente/articles/article">

article

<xsl:for-each select="vente/articles/article">

20
<xsl:value-of select="code"/>

xsl xml

21
XSL

XML

<?xml version="1.0"?>
<Homme>
<Personne>
<Person ID="1">
<Nom>Khal</Nom>
<Prenom>Simo</Prenom>
<Age>20</Age>
</Person>
<Person ID="2">
<Nom>MAKBOUL</Nom>
<Prenom>Hamid</Prenom>
<Age>20</Age>
</Person>
<Person ID="3">
<Nom>ESSAADANI</Nom>
<Prenom>Khalid</Prenom>
<Age>21</Age>
</Person>
<Person ID="4">
<Nom>Bourzayq</Nom>
<Prenom>Khalid</Prenom>
<Age>20</Age>
</Person>
</Personne>
</Homme>

22
>?"xml version="1.0?<
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<h3>Tous Les personnes</h3>
<table border="1" width="100%">
<tr>
<td>Nom</td>
<td>Prenom</td>
<td>Age</td>
</tr>
<xsl:for-each select="Homme/Personne/Person">
<tr>
<td>
<xsl:value-of select="Nom"/>
</td>
<td>
<xsl:value-of select="Prenom"/>
</td>
<td>
<xsl:value-of select="Age"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

23
for-each

<xsl:for-each select="Homme/Personne/Person" order-by="+Nom">

z a

Khalid

24
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<h3>Avec condition</h3>
<table border="1" width="100%">
<tr>
<td>Nom</td>
<td>Prenom</td>
</tr>
<xsl:for-each select="Homme/Personne/Person[Prenom='Khalid']">
<tr>
<td>
<xsl:value-of select="Nom"/>
</td>
<td>
<xsl:value-of select="Prenom"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

XSL XML

25
‫إذا كان لديك مالحظات أو تساؤالت أو وجدت أخطاء في‬
‫الكتاب فال تتردد في أن تراسلني عبر‬

‫‪Khalid_ESSAADANI@Hotmail.fr‬‬

‫‪26‬‬

You might also like