2013-04-25 54 views
0
<news><story><p>Located online at <url>www.guessthatgroove.com</url>, the service is 
    entirely free. He explained that the business model is based upon 
    commission fees from linked sites such as Amazon.com and iTunes, which 
    offer game players an option to purchase CDs and individual music tracks 
    that they encounter throughout the game. It's too early to tell whether 
    he has hit on another social phenomonon along the lines of Tall 
    Tales. Regarding the potential success of the online game, he 
    replied, <quote>It was a lot of fun to create and I enjoy playing it 
    myself, so in some ways I already consider it a success</quote>.</p> 

的xsl:我該如何在xsl文件中應用URL和Quote標籤的CSS樣式?

#p 
{ 
width:450px; 
text-align:left; 
margin-bottom:8px; 
color:black; 
font-family:Verdana, Arial; 
font-size:10pt 
} 
url 
{ 
font-weight:bold 
} 
quote 
{ 
font-style:italic 
} 
</style> 
</head> 
<body> 
    <div id="p"> 
     <xsl:value-of select="news/story/p" /> 
    </div> 

我的問題是如何申請的URL和引用標籤的CSS樣式在XSL文件?

+0

假設您的XSL正在輸出HTML(看起來像這樣),我希望CSS可以應用於任何帶有「p」標識的'div'標記,就像它說的那樣。 – Tim 2013-04-25 04:28:28

回答

0

取代< xsl:value-of select =「news/story/p」/ >使用< xsl:apply-templates/>併爲URL和Quote創建模板。

相關問題