<cars> <car><make>Cadillac</make><model>Escalade</model><year>2007</year></car> <car><make>Cadillac</make><model>Escalade</model><year>2011</year></car> <car><make>Ford</make><model>Mustang</model><year>1968</year></car> <car><make>Ford</make><model>Mustang</model><year>1998</year></car> <car><make>Mercedes</make><model>C-Class</model><year>1999</year></car> <car><make>Mercedes</make><model>C-Class</model><year>2009</year></car> </cars>
doc("cars.xml")/cars/car[year>2000].data
doc("cars.xml")/cars/car[xs:integer(year) gt 2000]
doc("cars.xml")/cars/car[year gt 2000]
doc("cars.xml")/cars/car[integer(year) > 2000]
<car>
element?<xs:element name="car"> <xs:complexType> <xs:sequence> <xs:element name="make" type="xs:string"/> <xs:element name="model" type="xs:string"/> <xs:element name="year" type="xs:string"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType> </xs:element>
<car>
element can be extended with only one attribute<car>
element can be extended with multiple attributes<car>
element have any attributes<car>
element has child elements which can appear in order<html xmlns="http://www.w3.org/1999/xhtml"> <head><title>XHTML Example</title></head> <body bgcolor="#FFFFFF" > <p>Content goes here ...</p> </body> </html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head><title>XHTML Example</title></head> <body name="bodySection"> <p><b>Content goes here ...</b></p> </body> </html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head><title>XHTML Example</title></head> <body color="#333333"> <p><i>Content goes here ...</i></p> </body> </html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head><title>XHTML Example</title></head> <body id="bodySelection"> <p><strong>Content goes here ...</strong></p> </body> </html>
<x/>
<x a="x" a="y"></x>
<p>
#DEFAULT
#OPTIONAL
#IMPLIED
#FIXED
<xsl:with-param>
element defines the value of a parameter to be passed into a template. It can be used within which elements?<xsl:apply-templates>
and <xsl:call-template>
<xsl:param>
and <xsl:processing-instruction>
<xsl:template>
and <xsl:transform>
<xsl:include>
and <xsl:variable>
<car>
against a fixed list of values. Which is the correct declaration?<!ATTLIST car color (red|white|blue|black) black>
<!ATTLIST car color (red|white|blue|black) #REQUIRED>
<!ATTLIST car color (red|white|blue|black) #FIXED>
<!ATTLIST car color (red|white|blue|black)>
<!DOCTYPE abc SYSTEM "file/file.dtd">
xsl:value-of-select="//car/make"/>
. What does it display?<cars> <car> <make>Cadillac <model>Escalade</model> <price year="2007">$20,000</price> </make> </car> </cars>
<cars> <car><make>Cadillac</make> <model>Escalade</model> <year>2007</year></car> <car><make>Ford</make> <model>Mustang</model> <year>1968</year></car> <car><make>Mercedes</make> <model>C-Class</model> <year>1999</year></car> </cars>
format-number()
id()
count()
position()
<cars> <car><make>Cadillac</make> <model>Escalade</model ><year>2007</year></car> <car><make>Cadillac</make> <model>Escalade</model> <year>2011</year></car> <car><make>Ford</make> <model>Mustang</model> <year>1968</year></car> <car><make>Ford</make> <model>Mustang</model> <year>1998</year></car> <car><make>Mercedes</make> <model>C-Class</model> <year>1999</year></car> <car><make>Mercedes</make> <model>C-Class</model> <year>2009</year></car> </cars>
<ul> { for $x in doc("cars.xml")/cars/car where $x/year>2000 order by $x/year descending return <li>{$x}</li> } </ul>
<ol> { for $x in doc("cars.xml")/cars/car where $x/year>2000 order by $x/year desc return <li>{data($x)}</li> } </ol>
<ul> { for $x in doc("cars.xml")/cars/car where $x/year>2000 order by $x/year return <li>{$x}</li> } </ul>
<ol> { for $x in doc("cars.xml")/cars/car where $x/year>2000 order by $x/year descending return <li>{data($x)}</li> } </ol>
readyState
property holds the status of the XMLHttpRequest. Which is NOT a valid status?4 (DONE)
3 (LOADING)
1 (PROCESSING)
0 (UNSENT)
<any>
element.<redefine>
element.<xs:extension>
.<cars> <car><make>Cadillac</make><model>Escalade</model> <price year="2007">20000</price></car> <car><make>Ford</make><model>Mustang</model> <price year="2008">17000</price></car> <car><make>Mercedes</make><model>C-Class</model> <price year="2009">24000</price></car> </cars>
/car[price>20000]/make/model
/car[price>=20000 and @year>=2009]/make/model
//car[price>=20000 and @year>2008]/model
/cars/car[price>=20000 and year>2008]/model
xs:required
.required
.Mercedes, Cadillac, Ford
?<cars> <car><make>Cadillac</make><model>Escalade</model> <price year="2007">20000</price></car> <car><make>Ford</make><model>Mustang</model> <price year="2008">17000</price></car> <car><make>Mercedes</make><model>C-Class</model> <price year="2009">24000</price></car> </cars>
<xsl:sort select="make" />
<xsl:sort select="model" />
<xsl:sort select="car" />
<xsl:sort select="price" />
/* */
<!-- -->
//
(: :)
<xsl:namespace-alias>
element is used to replace a namespace in the style sheet with a different namespace in the output. Which XSLT element needs to be its parent node?<xsl:namespace>