XSLT: XQuery
Eine Abfrage- und funktionale Programmier-Sprache, verwendet XPath.
Eine Abfrage- und funktionale Programmier-Sprache, verwendet XPath.
The mission of the XML Query project is to provide flexible query facilities to extract data from real and virtual documents on the World Wide Web, therefore finally providing the needed interaction between the Web world and the database world. Ultimately, collections of XML files will be accessed like databases".
Datenextraktion /-manipulation aus Dateien, die
Die folgende XQuery sucht alle Rollen aus Shakespeare's Hamlet und gibt sie als HTML-Dokument aus.
<html>
<body>
{
for $act in doc("hamlet.xml")//ACT
let $speakers := distinct-values($act//SPEAKER)
return
<div>
<h1>{ string($act/TITLE) }</h1>
<ul>
{
for $speaker in $speakers
return <li>{ $speaker }</li>
}
</ul>
</div>
}
</body>
</html>