Vous êtes sur la page 1sur 21

@ òÈíŠ òÛìu

. !"#$ %#& & '#() *+

reboly@gmail.com

-1-
@ †îè·
!"# $% & '
" 4 $% 12 ,& '3 12 + )& ,- + . / 0 ( )*
1 2 / ): ; < )& ,- = 7 , + , 8 )9 5% 4 5 6& '
1 2 > > .% , ?5% @ A BC DE F G% : H% , I 1 #
L ; 6*K CNN BBC +E & 'J% % !% > .% & '
.12 / 6*K / E G 6
2& % O P% / Q <> + ! !"% N
$ % & ' )9 2 R "% .# ) , ( +S > < @A / & 5F
.+A> . + ! T ?H,

@ RSS Þa@|Ü –ß
):& % &: P * + ! , 12 & - ): ,- U
& ' Z ( / [# $% ( RSS ) ( % " % VW6 7 C > G %U
\U ] % A F ^ K *K HP% / : & \U ( _ : )
. A" ` $% HP%
9 ! 3 7 C .# $% a % c , W6 XML a " ( % " # b6 RSS U
.XML b6 & ' &: P d
G j H *K & P ' W6 e f g 2 h % 0 iP 6 RSS
( % " # A" % Z# *K n,& # l o kV& i# / `, _ " l%m W">k
.7 C > A> i .

-2-
RSSåÇ@òbm@ò
k I p * ] ( )& qU r p W6 Z# *K RSS ( % " # & i#
k 2 RSS s s > & i % W6 + H +2
/ oG t 12 , ; " u= R " % 0 .# ( % " # b6 RSS
( _ : 'x 12 & ' / v ` , 12 @?", w !, : H %
.G#& ,u%
2 / o `p & ' y # 'z 7 C> / o
.12 VW6 )& ,u% ( _ : 12 / : , ;
/ *E f & i % / "" | & ' :{ u RSS & / o mU
. K % Z.p % A. 12
12 /, ! f )& !" 5 ! 'x t } H +P~ DE
H ]D' / F k 12 /, ! % )& ,u% i? l%W G# 5 " A,
. % A. 12 VW6 + % +P s > ) p

: RSS
RSS & i# f •6 € w "6
., 0.91, 0.92 & 3^ I • > > ••!" .1
.L5F L . + ! > 5% XML
6 " RSS 1.0 V ‚ ƒ! ƒF l%m 1„!, e 'x j, F w "6 .2
. 0.9x & 3 1 L . G !# A… $% XML RDF 7 C >

-3-
RSS G !# RSS 2.0 b6 )& i C. • •„ " z 6
xml a% 7 C > b5 ` p 0.92 & D% , i# : y 1.0
. AS " f R > 6 > 5%
. ATOM b‚ & ' j, F A… 6
7 A † v ".% ]D' & U ) RSS / z mU
RDF c , 0 iP W6 6 " RSS ] b> > & 3 f 1999
.Site Summary
$% Resource Description Framework )& % & P ' 6 RDF
meta ] F v‡ 12 byQ 0 . % T A" ] 5 / o
.ˆ ‰ \U
RSS 0.9 @> s NetScape G „ RSS / & 3 W6
\U RSS 0 iP ] } ` p RSS 0.91 & 3 . „ Š
& U ‹ U / NetScape H2 # Rich Site Summary
& > ( RSS /,& i ) RSS-Dev ^ {‚ y 2 ),(
. 5 .% / H ' $% RSS 1.0 & ƒF ) , ( & ‡
DAVE + 2 / RSS / & 5 > E C."% & 2002 7 f
RSS 0 ` p 0 iP * a# 1 RSS 2.0 @> F WINER
. Really Simple Syndication :c ,
u ?, " ?# RSS 0.92 1 5F % RSS 2.0
.): LS > % +E F vU
2005 7 f & V € hH" + % > RSS t& i y
." • " ( % " # Q # $% RSS 1.1 ): .

-4-
RSS f • > > •6 € w "6 ƒ V m +Ž "" o & P '
G !# w "6 / @K % 12 • & ' " u f + % 9 "q @AF: P">
: • A"
0.90 , 1.0 , 1.1 & 3 ‘ ’ 6 RSS 1 •
0.91 , 0.94 , 2.0 & 3 ‘ ’ 6 RSS 2 •
“& 3 @2 @ T m 6 "6 ] [.%
@2& " u O ” XML a% # f % "% 6 Z .%
O s /% & 3 @2& F V& • tW% RSS ] " & U
./, '– 12 "2 • & ' / u
1 hF " , RSS f `% q V € — H "" o G ‡F Atom ] ."%
.RSS 2.0
VW6 f A" r s > WI % p @ : & ! E RSS 2.0 Q #
/% G ‡F ( + ! RSS 2.0 @ , / G \U V " @A / . % 8
. 5p Atom " f * a# r ˜ e mU Atom G # 9 "q + ! G( ,

‰bj þa@òäßaŒß@wßaŠi@âa†‚n a
O @ @A / " ‘ ' RSS " . ™!" O @ +2
. RSS " j, š / ˆ ' 12 / :2 & ' d .
+E & ' 1{ y z 7 C > b6 l%m + H% +A> 5, i%
6 z " % b‚ % 12 / G ] P_ / o FeedDemon
) H% y F G ` p http://www.FeedDemon.com
/ + ]D5 > + , +5 . z 6 ( Free Trial ) , €
: z Q % )WF AN# % % )& P% . d .

-5-
z DE ˆ ' z 1 % + # F vU ˆ ' z w "6
( G% F v‡ Microsoft Outlook z 1 L , tW% newsgator
y • l%m Outlook z \U & ' 1 „ 7 5, plug-in)
: ( z Q% .( ... &: P% – :& % ) ): ( ,: % ›1 ,(
. http://www.newsgator.com : 6 z " 12
f "? S& 5% 6 &: P ] % f ' & ' w "6
. Apple ! ‘ ’ SAFARI d . +E d .
/ 7: 5% & 3 f RSS @ # s > F > ,
.&& . U
.# % p ): ( v . ( plug-ins ) F vU + } / o ?,
h F , F D,- d .= ‘ ’ SAGE RSS +E RSS & ' )9 2 f
http://www.sage.mozdev.org " % / (Mozilla Firfox)

-6-
RSS 2.0@òÌÛÝ a…
: a% f
RSS iP •
<v %b & P \U : 5, ˆ ‰ / +PH" 9u( 6: RSS ITEM
.12 p f
.(channel) ) "2 f A? 1 1 € / o items / P y
7 .2 qDq \U " 2 f & ' &: P @.5 :& mU ] E + >
.) "2 • # s > VW6 / ) p + ( % " % , v , % , . % / %
.( " ) (items) t } A" + "2 / G RSS Q "> mU
:Ÿ % + !% • 6

. " % / : t } ) "2 t ˜ " . + )& P% f pD


Z¡ G U ) "2 + f " % : ‘ 5 U ): ,- f )* w "6
.) p ) "2 ". t ˜
(News Items) & ' " / •
:L5F • 7 C > O , / o & ' P" t
.& ' P" " :Title
. P" % OP# /, i> i> / ‰ :Description

-7-
. P" % L # & P ¢ !# £ #& " :Link
.QC % !"% n,& #: PublicationDate
.RSS a% \U ) @( # @ 6 H VW6
: (Tags) 7 > % 7 C . & ' P" u % E ,
<pubDate> , <link> ,<description> ,<title>
:]E

<title> </title>
<description>
... ( )* +, ! " # $ %&'
</description>
<link>
http://www.storylink.com/../..
</link>
<pubDate>
Tue, 02 Aug 2005 10:10:33 GMT
</pubDate>

<title> b6 & ' P" + % j i + ! ,& ?% 7 > %


O % 9H :& mU <link> @> % w # / o <description>
Q’ P" @ % A C > / o F vU 7 > ) ( ,.< v % Ÿ
... 6*K <author> +E
VW6 / % b> > + ! 7 > 1 & / z "# & ' " ‡F ˆ
.L5F % 5 Q’ 1 i P2 AN# TU Q’ AN# 7 > %
1 (items) & ' " @SD O 6 j .% byQ% 1i5 f V Ž e
• .& W RSS ] " . 1 ) "5% @SD O ?, (channel) ) "5%
channel , 7 > % k E + PH k % ] 3 i ˆ' 7>%
.RSS ] " . \U ˆ 'U 7 > F vU @ % + .# item

-8-
& 7 > % O¤a, 6 5 5_ f : H & ' P" +Eo <item> @> %
. 5 > 6 m $%
0 P % j .% & ' P" , % <item> @> % F vU / o l%W%
:b,
<item>
<title>
C DEF G HG
</title>
<description>
... LM+ IJ K C DEF G HG
</description>
<link>
http://www.xml.com
</link>
<pubDate>
Tue,02,Aug 2005 10:20:33 GMT
</pubDate>
</item>
f h% j .% : % 1 "6 sD ' pD
/ % <pubDate> <title>,<description>,<link> 7 > %
.<item> @> % f "{ ? 7 > % VW6 " ( " 6 sD '
/ % & ' P" t 7 % + !% 6 + !% W6 ƒ : 5 \U : 5, W6
. <channel> ) "5% @> 7 C . O ˆ e – \U
" y +5"% ) "2 / * % 7 C ., <channel> ) "5% @> U
P" 1 # ) "5% O % 7 C .# 9 " 7 > ) / O%ƒ , 6 & '
. H% & ' " / Q# E <item>
P" / * % C . l % — ! ) "5% / * % C . 7 > %
.<pubDate> @> % 9 "E > <item>

-9-
:) "5% @> 7 C > H 0v , Ÿ % ] E

<channel>
<title>

</title>
<description>
... G G O IJ K O PQ!
</description>
<link>
http://www.w3c.org
</link>
...
</channel>

<description> O % k <title> " % b6 ) "5 % ,& ?% 7 > %


. <link> £ #& k
) "5% / F vU + H# 7 5# / o ˆ ' F v3 7 > % / , % w "6
...<copyright> <language> , <image> +E
/ v A v @ , O <item> " % 7 > 6 : % W6 V AN, e
. ) "5% @>
6 'x @> O ?"> k – 5p + RSS O : Žs>
.<rss>
]D' / a % & 3 /{ , G ‡F @> % W6 G 7 5, tW% )- f
. version P P’
: Z "> " ‡F RSS 2.0 1 + " DE F
<rss version="2.0">...</rss>

- 10 -
+ I + !# $% RSS " . f > > 7 .2 > &: –
RSS " . f V m 1 † 1 Ž O 6 Ÿ % @.5% k " . % b> >
.& ' y) t ˜

@ ‰bj c ‰…b–ß@õb’ãg
0v , Ÿ % ] E k& ' ›+ RSS ". : ‡ 7 5 "" o –
:l%m
1: <?xml version="1.0" ?>
2:
3: <rss version="2.0">
4: <channel>
5: <title>WXYXZ [, Q!</title>
6: <description>]^ $ [I _K ' PQ! ` , G G+E</description>
7: <link>http://www.web-buds.net</link>
8:
9: <item>
10: <title>e QEf gh_iG j , k ^ G '+DM %Il</title>
11: <description>
12: WXYX (LG +I ' gh_iG m +nio ! pq k ^ G gh_iK ' ]^ G r & W l s
k s tu vXw v , x yM zG {|
p K ' rKQG ' (I k ^ G w +yi K +^ O CC D}l
x (~•€! •+‚ ' IG M vƒh_iK WX€•.
13: </description>
14: <link>http://www.web-buds.net/a49
15: </link>
16: <pubDate>Fri, 01 Feb 2007 10:20:44 GMT</pubDate>
17: </item>
18:
19: <item>
20: <title>…P† ‡ z, ˆ % G (_• +‰ •</title>
21: <description> ˆ % G ! i ŠQ‹ Œ !
• G ˆ % G ! i ŠQl )*
+, Ž q </description>
22: <link>http://www.web-buds.net/a32</link>
23: <pubDate>Thu, 28 Jul 2007 00:17:07 GMT</pubDate>
24: </channel>
25: </rss>

- 11 -
$% 7 > % O ¥ / ? , + RSS O { O AN, : % W6 U
.) p channel ) "2 ]D' / " &' " d % 6 ">&:
k 7..5 i> f l%m ) "5% ] p + H# , b6 \ ) i’
" % 1 † ] E W6 f k " % 7 > ‹ &:‡ 9 % / o ) "5% @> 1v
" pD <link> <descrition> <title> 7 > % l |
, % l> j ."# 7 C > tW% <pubDate> @> % " C >
. 23 16 i> f n,& % 2%
• ‡F <pubDate> @> % f 5 . n,& % 2 , " 2 mU
.n,& % l%m r p ¦p " . VW6 AN# /% RSS] S& 2
) . : ]D' / " zS d "" o G " 2 § ƒ %
O Q” : b6 t (Feed Validator) &: P {!
: +E % F G# , ; d # RSS
http://www.feedvalidator.org
.] 5 •D F .rss .xml : " ‘ ’ RSS ] O .# / o
6" G / ƒ# 2 " ‘ ’ RSS ] O d ¨ mU –
. " 2 " u G C > /, '©% / o V ! "" o

:b, 12 f O % £ #& 1v l%m @ , š


<a type="application/rss+xml" href="feed.rss"> </a>

: +E £ #&D% 5, 7 C ., G ‡F 12 ZK f 6!

: feed.gif A‚ )& P% & b, : %Z 6"


<a type="application/rss+xml" href="feed.rss">
<img src="feed.gif" border="0" /></a>

- 12 -
Z¡ / % " ‘ ’ O 1"P O " # 5F kbH , W6 @ª« # / %
.7: 5% +PH% < v 6 W6 /, '– H d @( O @

@ ‰bj þa@‰…b–ß@.ŠÇ

] S& 2 / # ` ¬ RSS a " . Z O "F –


@( , d , G" o RSS -& 2 1"P O @ s > kG#9 2 / RSS
. ( channel "2 ) ) A? / PH" & ' &: P )
. ) "2 & P + @( % ‘ ' XML O ™!" Z¡ l%m +( /
®Dš3 Z *K p xml O \U & ' &: P ) < u U
, rss O + " \U L5F ‹ ~ 5 5_ f )*E Zi,
.G † # Gv
:12 qDq & ' d / L . ] E W6
1: <?xml version="1.0" ?>
2: <?xml-stylesheet href="feeder.xsl" type="text/xsl"?>
3:
4: <feeds>
5: <feed src="http://www.web-buds.net/feed-free" />
6: <feed src="http://wwww.web-buds.net/feed-commercial" />
7: <feed src="http://www.web-buds.net/feed-downloads" />
8: </feeds>

. feedtest.xml @> : % WI t ‰ O b ."%


+E ' 7 > % 7 C > 0, feedtest.xml j .% O pD
% f p RSS & P + E % src b6 ) p ¯ <feed>

- 13 -
f <feeds> @> % f "° ? + !% W6 / 7 > % 1 † 7..5
. " . / b> > P" Q , tW% 4 i.%
j ."# O L & @ , ` p ± E% i.% f : ( " . W6 f ² H U
7{ 5# XSLT a VW6 L "% j ."# H feeder.xls 6 £ ³
f zS "% d kˆ ‰ j ."# k& ' &: P )9 5% i OS … % 1 †
. 0HP

@ bèmõaŠÓ@Ýuc@åß@‰bj þa@‰…b–ß@Ýíì¤
)9 2 H / )*E t ˜ ] E feedtest.xml " . U
. 6& A…U +( / I ˜ & ' &: P 1{ y L5F G U +
8 " . f & ' & P + )9 2 / ] [. 6 feeder.xsl O
.j{." +5 . + ! & ' y + d % RSS ] :
.XSLT VW6 L "% H / + ] E b , F
1: <?xml version="1.0"?>
2: <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3: <xsl:template match="feeds">
4: <html><head><title>Today's News</title></head>
5: <style>
6: <xsl:comment>

7: h1 {
8: width=600px;
9: font-family:verdana, arial;
10: font-size:12pt;
11: font-weight:bold;
12: color:#FFFFFF;
13: background-color:#660000;
14: }
15:

- 14 -
16: p {
17: width:600px;
18: font-family:verdana, arial;
19: font-size:9pt;
20: color:#333333;
21: }
22:
23: .date {
24: color:#999999;
25: }
26:
27: a:link {
28: font-weight:bold;
29: text-decoration:none;
30: color:#660000;
31: }
32:
33: a:hover {
34: font-weight:bold;
35: text-decoration:none;
36: color:#990000;
37: }
38:
39: a:visited {
40: font-weight:bold;
41: text-decoration:none;
42: color:#333333;
43: }
44: </xsl:comment>
45: </style>
46:
47: <body>
48: <xsl:apply-templates/>
49: </body>
50: </html>
51: </xsl:template>
52:
53: <xsl:template match="feed">

- 15 -
54: <xsl:apply-templates select="document(@src)"/>
55: </xsl:template>
56:
57: <xsl:template match="channel">
58: <h1><xsl:value-of select="title"/></h1>
59: <xsl:apply-templates select="item"/>
60: </xsl:template>
61:
62: <xsl:template match="item">
63: <p>
64: <xsl:element name="a">
65: <xsl:attribute name="href">
66: <xsl:apply-templates select="link"/>
67: </xsl:attribute>
68: <xsl:value-of select="title"/>
69: </xsl:element>
70: <br />
71: <xsl:value-of select="description"/>
72: <br />
73: <span>
74: <xsl:if test="pubDate">
75: <xsl:value-of select="pubDate"/>
76: </xsl:if>
77: </span>
78: </p>
79: </xsl:template>
80: </xsl:stylesheet>

5 i.% / 9 CSS : t ˜ W6 XSLT £³ O pD


. m( %† E % HP% , ‰ j ."# 1v A A 45 ¦p
Ÿ 5# /, " 1 Li¥ / : ´ % j ." 7 5, W6 CSS % :
... µU t: % % n,& %

- 16 -
@> % j{i 6
" . f : ( XSLT ] : pD /
"{ ? HTML ] # U 5 5_ f xml ] " . f <feeds>
O S 5 # xml ] O f ) ; CSS £ ³ H f ':
.XML ] O f / ? XSLT ]
Z% 5% W6 k& ' & P + +, } & W'ƒ, feed , a Z% 2
src ’ G% 2 , | ]D' / document() XSLT % 1 # b .,
.( 54 i.% )
`p £³ H \U 1F # 5# $% l # &: P 6 zS "% , T
XSLT ] Z% 2 Z ¡ 6 i.% W6 .RSS " . ¶ # / o
. "% "5% : 6& A…3 / 5
@> HTML H \U ) "5% " 7 5, š . ) "5% Z% 2
" % Z% 2 \U " % Z% 2 5 O ?, 6 ( 58 i.% ) <h1>
f + % / @Cv & % 7 5, " % Z% 2 ‡F "6 / ( 59 i.% )
.0HP A 5, ` p HTML \U RSS ] +5 9 "q + %
\U : 5, " % W6 & ' P" " % ¢ !# £ #& 9 ! ‡ , P" % Z% 2
.( 69 \U 64 / ) QC % b 12 f b> > Q’
6 1 , ( 71 i.% ) t: B" G" ?# @ , 6 Q’ P" % O %
Z.p l%m Date w j{.", ` p ( 77 \U 73 / ) !"% ·&
. ( 25 \U 23 ) f O , f CSS ] #
£ !% 7 C . " ‡F t& (U h % t& ' 6 <pubDate> @> %
. U Gv @ % V: ( & ' if

- 17 -
f• 6 ) G C > / o XSLT % £ ³ HP% O W6
0HP f G C > / o feedtext.xml O ` p 5 )& P%
.7 C .
Internet Explorer 7 C > d > " zS "% AN# % % )& P%
.( ] E f ): ( *K )& P% f rss % /, " š #& š)

UQ u = & ' &: P d . 7 C > +?F / G / @K %


i. D, .RSS ] &: P d > b(m ³ + 6 ] E W6
.+?F + ! : % , i# / o feedtest.xml O f

ò•ý
6E XML a% C > @6 / p " # % 8 VW6 ]D' /
.7 , VW6
T A" ] 5 / o " U RSS & i# f ¸ ! n,& % / @K %
.h > +A> A + % @AH% A> ( % " #

- 18 -
t: 7 C . k RSS 1 + % 9 "q " & ’ / : w "6
5, i Av > ", % ?H 12 % RSS /, " Hp H / D%
.& ' )9 2 z f
’ RSS % H 9 ! U f "5 % / ): H > / o 12 z Q
d 7 5"% l%m RSS ] &: P S& 2 : U ?, / o " 2 =
. " 2 / v ˆ ' 12 & '
T ]5 "" o RSS ( % " # A F 7 C ."> $% 5, i% / N"% •a
. (%" #

...

- 19 -
XML
" b6 XML a% ] p ) H t } $% 12 • "6
:• 5 •S %
http://www.xml.com
http://www.xml.org
http://www.webdesign.about.com/od/xml/
http://www.xmlpitstop.com
http://www.devx.com/xml/
http://www.webdeveloper.com/xml/
http://www.hotwired.com/webmonkey/xml/
http://www.msdn.microsoft.com/xml/
http://www.xmlresources.com
http://www.en.wikipedia.org/wiki/xml/
http://www.w3c.org/xml/xml/1999/xml-in-10-points/

o RSS 0.90 : RDF Site Summary


o RSS 0.91 : Rich Site Summary
o RSS 2.0 : Really Simple Syndication
o RDF : Resource Description Framework
o XML : EXtensible Markup Language
o XSL : EXtensible Stylesheet Language
o XSLT : XSL Transformations
o CSS : Cascading Style Sheet
o HTML : HyperText Markup Language

http://www.mnot.net/rss/tutorial/
http://www.xml.org
http://www.xml.com
http://www.w3c.org
http://www.w3schools.com
http://www.brainbell.com/tutorials/XML/

reboly@gmail.com : Z X UY P & + VW X R#S$Q T# U' Q N# OP M

. !"#$ %#& & '#() *+

- 20 -
pbíìn a

2 ................................................................ A|
2 ...................................................... RSS 0 iP
3 ................................................ RSS / ¹& # ‰
5 ......................................... & ' " u z 7 C>
7 ................................................. RSS 2.0 a% +' :
11 ................................................... & ' &: P 9 ! U
13 ............................................... & ' &: P d
14 ................................ 49 2 +( / & ' &: P +, }
18 ............................................................ D'
20 .............................. 1( iP &: P
21 ................................................. (R AH% ) , ‰

- 21 -

Vous aimerez peut-être aussi