XSD
<xs:element name="employee"> _<xs:complexType> __<xs:sequence> ___<xs:element name="firstname" type="xs:string"/> ___<xs:element name="lastname" type="xs:string"/> __ </xs:sequence> _</xs:complexType> </xs:element> Continuació XSD
Bibliografia: -> apunts Jordi Vidal -> http://edutechwiki.unige.ch/en/XML_Schema_tutorial_-_Basics -> https://www.w3schools.com/ |
XML
Afegir entrades a la taula: <xsl:for-‐each select="cd"> _<tr> __<td> ___<xsl:value-‐of select="title"/> __</td> __<td> ___<xsl:value-‐of select="artist"/> __</td> _</tr> </xsl:for-‐each> XML continuació
<xsl:for‐each select="catalog/cd"> _<xsl:if test="price > 10"> __<tr> ___<td><xsl:value-of select="title"/></td> ___<td><xsl:value-of select="artist"/></td> ___<td><xsl:value-of select="price"/></td> __</tr> _</xsl:if> </xsl:for-each> XML continuació2
<xsl:for-each select="catalog/cd"> <tr> __<td><xsl:value-of select="title"/></td> __<xsl:choose> ____<xsl:when test="price > 10"> _____<td bgcolor="#ff00ff"> _____<xsl:value-of select="artist"/></td> ____</xsl:when> ___<xsl:otherwise> ____<td><xsl:value-of select="artist"/></td> ___</xsl:otherwise> __</xsl:choose> </tr> </xsl:for-each> |
Xpath
Xquery
Consultes a Xquery: let $doc:=doc('/Users/palamos/GoogleDrive/M4-XML/UF2/material/xquery_intro/videos.xml') for $a in $doc//actors/actor where ends-with ($a, 'Lisa') return $a |
Cheatography
https://cheatography.com
llenguatgeMarquesUF2 Cheat Sheet (DRAFT) by alxndre
This is a draft cheat sheet. It is a work in progress and is not finished yet.