bu konu epey eski. xml veri saklamakda ve taşımakda epey sıklıkla kullanılan bir format. gayet basit de bir mantığı var. xsl de bu xml verilerini şekle sokmaya yarayan stil yazımı. örnek olarak herhangi bi yerden gelen belli bir formattaki xml bir xsl e tabii tutulup sonuçda html çıktısı alınıyor ve kullanıcıya sunuluyor.
sabah sabah bi RSS reader ile uraşıyorum ve rss leri bir türlü sınırlayamıyorum en az 100 tane geliyor. C# ile bızdıkladım biraz ama bir türlü ilk 5 tanesini gösterir duruma getiremedim sonra aramalar sonucu öğrendimki C# a hiç gerek yokmuş zaten rss ile aldığım xml veriyi ben bir xsl den geçiriyordum. ve XSL bu işi becerebiliomuş azcık nazlandı ama not edelim örnek kod:
<xsl:for-each select="//*[local-name()='item'][position() < 12]">
daha önceki hali <xsl:for-each select="channel/item"> şeklinde olan xsl bütün rss i alıp gösteriyordu tabiiki buda 100k dan fazla bi çıktıya sebep oluyordu. üstteki örnek kod sayesinde ilk 12 item gösteriliyor.
aslında çoğu zaman işler böyle çözülebiliyor geçende gridview da bir cell deki veriyi h1 tagları arasında göstermek için C# ile uraştıktan sonra database den direk h1 lemek geldi aklıma bu sayede frameworkü hiç yormadan database de iş bitmiş oldu.
Showing posts with label xsl. Show all posts
Showing posts with label xsl. Show all posts
Sunday, January 06, 2008
Subscribe to:
Posts (Atom)
playwright in junie
{ "mcpServers" : { "playwright" : { "command" : "npx" , "args" : [ ...
-
I know its been a long time I have not write anything. because I have not learn or done any new things. I dont want to write regular meaning...
-
in .net 2 if you want to show your application in system tray . you need to add notify icon to your application and set the "ShowInTas...
-
if you have wl11 ejb server and in that environment generated ejb client and deploy to wl12 it will give you this exception java.lang.NoSu...