1 / 11

IDU0075 Sissejuhatus veebiteenustesse

IDU0075 Sissejuhatus veebiteenustesse. Tarvo Treier Tarvo.treier@gmail.com. E xtensible S tylesheet L anguage T ransformations ( XSLT ) . XSLT on XML-põhine keel XML dokumentide mingisse teise formaati teisendamiseks.

blaise
Download Presentation

IDU0075 Sissejuhatus veebiteenustesse

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IDU0075 Sissejuhatus veebiteenustesse Tarvo Treier Tarvo.treier@gmail.com

  2. Extensible Stylesheet Language Transformations (XSLT) XSLT on XML-põhine keel XML dokumentide mingisse teise formaati teisendamiseks. XSLT kirjeldab reeglid, millega lähtepuu (source tree) transformeeritakse tulemuspuuks (result tree). Lähtepuust päritakse andmeid kasutades XPATH-i. Tarvo Treier tarvo.treier@gmail.com

  3. Allikas: http://upload.wikimedia.org/wikipedia/commons/e/e6/XSLT_en.svg Tarvo Treier tarvo.treier@gmail.com

  4. Kasulikke viiteid XSLT õppetund w3Schools lehel http://w3schools.com/xsl/ XSLT Reference http://www.zvon.org/xxl/XSLTreference/Output/index.html W3C Recommendation http://www.w3.org/TR/xslt Tarvo Treier tarvo.treier@gmail.com

  5. XSLT Näide 1 http://www.zvon.org/xxl/XSLTutorial/Output/example1_ch1.html Tarvo Treier tarvo.treier@gmail.com

  6. Milleks kasutatakse? Andmete konverteerimiseks erinevate XML Schema-de vahel (meie kasutame samuti). XML andmete HTML-ks või XHTML-ks konverteerimiseks (näide 1). XML andmete tavaliseks tekstiks või PDF-ks või mõneks muuks dokumendiks konverteerimiseks. Tarvo Treier tarvo.treier@gmail.com

  7. Tunninäide: Lähte XML <?xml version="1.0" encoding="UTF-8"?> <raamatupood> <raamat> <pealkiri>Everyday Italian</pealkiri> <autorid> <autor> Giada De Laurentiis </autor> </autorid> <hind>30.00</hind> </raamat> </raamatupood> Tarvo Treier tarvo.treier@gmail.com

  8. Tunninäide: Oodatav tulemus XML <?xml version="1.0" encoding="UTF-8"?> <bookstore xmlns="http://www.ttu.ee/bookstore" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <book> <title>Everyday Italian</title> <author>Giada De Laurentiis</author> <price>30.00</price> </book> </bookstore> Tarvo Treier tarvo.treier@gmail.com

  9. Tunninäide: vajalikud teisendused <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns=" http://www.ttu.ee/bookstore " xmlns:xsl... ... <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <bookstore> <book> <title> <xsl:value-of select="raamatupood/raamat/pealkiri"/> </title> <author> <xsl:value-of select="raamatupood/raamat/autorid/autor"/> </author> <price> <xsl:value-of select="raamatupood/raamat/hind"/> </price> </book> </bookstore> </xsl:template> </xsl:stylesheet> Tarvo Treier tarvo.treier@gmail.com

  10. XSLT protsessorid XSLT protsessorid võivad olla kliendi- või serveripoolsed. Mitmetesse JAVA ja .NET-i jt raamistikesse on XSLT protsessorid juba sisse ehitatud. Tarvo Treier tarvo.treier@gmail.com

  11. Online vahend katsetamiseks • http://www.xmlper.com Tarvo Treier tarvo.treier@gmail.com

More Related