> 1. Toi dang viet chuong trinh luu tru du lieu dang tieng Viet. Du lieu co the duoc export ra XMLToi khong thay bat ky problems nao o day ca. Chuyen export ra XML la cong viec rat don gian neu nhu ban hieu XML va biet cach dung cac tools cua Sun hoac IBM.>2. Chuong trinh chay tren moi truong WEB. Neu browser nao do connect den dua vao header ta co the doan biet duoc browser do la loai browser nao( hieu hay khong hieu XML) de "choang len du lieu XML chiec ao XSL thich hop" va quyet dinh se Transform tai server hay chuyen qua trinh Transform va Render ve client. Tren thuc te chang ai lam nhu ban ca. Thong thuong nguoi ta dung ket hop XML voi XSL de phat sinh ra mot loai document khac phu hop voi chuong trinh dung de view. Chang han ban co the dung XSL de tu dong phat sinh mot file XML thanh mot file HTML va co the cho no hien thi tren moi Browser ///:~> Nhung file XSL cung lai la mot file XML.Do do viet tieng viet trong XSL cung nhu trong XML.Ban da hieu hoan toan sai roi.XSL la Extensible Stylesheet Language (XSL: http://www.nwalsh.com/docs/tutorials/xml98/index.html) thi khong the la eXtend markup language duoc va hai loai nay duoc dung voi hai muc dich hoan toan khac nhau. That buon cuoi khi nghe ban muon luu du lieu trong XSL file. Hay co gang hoc them nhieu hon truoc khi bat tay vao lam; dac biet, phai hieu cho ro muc dich su dung cua tung cong nghe khong nen voi vang
)))Hay thu lai:
Nguyen Phuc Nguyen
Good luck,
NAM
XML/XSL là công nghệ rất hot hiện nay. Chỉ có người không biết cách dùng nó chứ bản thân nó được support đầy đủ .....
Hi,Tôi không ưa gì các công nghệ web của Microsoft nhưng vì bạn muốn dùng nó cho nên tôi cũng sẵn lòng giúp đỡ bạn. Công nghệ XML/XSL được support về font chữ đầy đủ chỉ có người dùng nó mà không hiểu cách thì không thể dùng các bộ font khác ngòai ASCII được. Để dùng được tiếng Việt trong XML/XSL bạn phải đặt dòng đầu tiên trong file như sau:Sau đây là một ví dụ dùng trong IE4/ IE5
1/ portfolio2.xml
| HTML |
| <?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="portfolio2.xsl"?> <portfolio xmlns:dt="urn:schemas-microsoft-com:datatypes"> <stock exchange="nyse"> <name> Công ty zacx corp </name> <symbol> ZCXM </symbol> <price dt:dt="number"> 28.875 </price> <logo> Zacx Corp. </logo> </stock> <stock exchange="nasdaq"> <name> Công ty zaffymat inc </name> <symbol> ZFFX </symbol> <price dt:dt="number"> 92.250 </price> <logo> <P STYLE="font:italic 14pt 'Arial Black'"> zaffymat </P> </logo> </stock> <stock exchange="nasdaq"> <name> Trung T©m Phần Mền Sài gòn SoftPark </name> <symbol> ASFG </symbol> <price dt:dt="number"> 92.3 </price> <logo> <P STYLE="font:italic 14pt 'Arial Black'"> SoftPark </P> </logo> </stock> <stock exchange="nasdaq"> <name> Công ty TechPie Inc. </name> <symbol> TSFG </symbol> <price dt:dt="number"> 94.3 </price> <logo> <P STYLE="font:italic 14pt 'Arial Black'"> TP </P> </logo> </stock> <stock exchange="nasdaq"> <name> Công ty Ulysses Việt Nam </name> <symbol> AHGG </symbol> <price dt:dt="number"> 95.3 </price> <logo> <P STYLE="font:italic 14pt 'Arial Black'"> Ulysses Inc. </P> </logo> </stock> </portfolio> |
2/ portfolio2.xsl
___________________
| HTML |
| <?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <HTML> <BODY> <xsl:for-each select="portfolio/stock"> <!-- <DIV STYLE="font-size:smaller"> --> <font face=".VnTime" size="4"> Ký Hiệu: </font> <xsl:value-of select="symbol"/> , <font face=".VnTime" size="4"> Tổ Chức: </font> <font face=".VnTime" size="4"> <xsl:value-of select="name"/> </font> , <font face=".VnTime" size="4"> Price: </font> $ <xsl:value-of select="price"/> <!-- </DIV> --> <DIV> <!-- select the children of the logo element --> <xsl:apply-templates select="logo/*"> <!-- recursively apply this template to them --> <xsl:template> <xsl:copy> <xsl:apply-templates select="@* | * | comment() | pi() | text()"/> </xsl:copy> </xsl:template> </xsl:apply-templates> </DIV> <HR/> </xsl:for-each> </BODY> </HTML> </xsl:template> </xsl:stylesheet> |
Good luck,
Nam Tran