Upload
dmitriy-shabanov
View
831
Download
4
Embed Size (px)
DESCRIPTION
Citation preview
http://exist-db.org
Укрощение XML
Дмитрий Шабанов
eXist-db.organimotron.org
twitter.com/shabanovd
http://exist-db.org
Когда используешь XML, то НЕ НАДО РАБОТАТЬ
XML НЕ РЕШИТ Ваших проблем
Мифы и реальность
http://exist-db.org
XML — это формат представления
данных и структуры
Мифы и реальность
http://exist-db.org
Стандарты
договоренность достигнутая и принятая сообществом
Мифы и реальность
http://exist-db.org
XML, HTML5, URI, PNG ......
XQuery,XSL, XSL-FO, XProc, …
...XForms, VoiceXML, …
MathML, ...
Стандарты - W3C
http://exist-db.org
DocBookDITA
OpenDocumentXACML
….
Стандарты - OASIS
http://exist-db.org
<article> <title>Writing DocBook articles</title> <artheader> <abstract>This article describes how you can use DocBook to develop PDF documents and will cover tools you need to edit DocBook articles and tools to translate them to PDF documents. </abstract> <author> <firstname>Egon</firstname> <surname>Willighagen</surname> </author> <date></date> </artheader></article>
Стандарты - DocBook
http://exist-db.org
Стандарты - DocBook
http://exist-db.org
Трансформации
http://nwalsh.com/docbook/procdiagram/
http://exist-db.org
<xf:input id="first" ref="firstname">
<xf:label>Firstname:</xf:label>
<xf:hint>enter your firstname</xf:hint>
<bf:data bf:readonly="false" bf:required="true" bf:type="string"/>
</xf:input>
XForms
http://exist-db.org
XSLTForms
BetterFORM
XForms
http://exist-db.org
Язык запросов
XQuery
XQuery
http://exist-db.org
<PLAY> <TITLE>The Tragedy of Hamlet, Prince of Denmark</TITLE>
... <ACT> <TITLE>ACT I</TITLE> <SCENE> <TITLE>SCENE I. Elsinore. A platform before the castle.</...
... <SPEECH> <SPEAKER>BERNARDO</SPEAKER> <LINE>Who's there?</LINE> </SPEECH> <SPEECH> <SPEAKER>FRANCISCO</SPEAKER>
...
XQuery
http://exist-db.org
<html><head/><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>
XQuery
http://exist-db.org
<html><head/><body> <div> <h1>ACT I</h1> <ul> <li>BERNARDO</li> <li>FRANCISCO</li>
... </ul> </div>
... </body></html>
XQuery
http://exist-db.org
Язык запросов и
функциональный язык программирования
XQuery
XQuery
http://exist-db.org
xquery version "3.0";
declare namespace ex = "http://exist-db.org/xquery/ex";
declare function ex:map($func, $list) { for $item in $list return $func($item)};
(: Create an inline function and assign it to $f :)let $f := upper-case#1return ex:map($f, ("Hello ", "world!"))
XQuery
http://exist-db.org
map( function($x) { $x * $x }, 1 to 5 )
XQuery
http://exist-db.org
Язык модификации данных
XQuery Update Facility
XQuery Update Facility
http://exist-db.org
<root> <message>Hello World</message></root>
let $doc := doc('/db/test.xml')/root let $update := insert node attribute foo {'bar'} into $doc
return $doc
<root foo="bar"> <message>Hello World</message></root>
XQuery Update Facility
http://exist-db.org
XPath
XSLXQuery
XSL-FOXQueryUpdate Facility
Принцип наследования
http://exist-db.org
XQuery enables you to achieve high productivity in your projects
The Amazon XQuery Client Library was written with 80% less code than its equivalent written in
Java
zorba-xquery.com
Локоничней
http://exist-db.org
http://en.wikibooks.org/wiki/XQuery
Что почитать?
http://exist-db.org
BaseXBerkeley DB XML
eXist-dbDB2 9 with pureXML
MarkLogicMonetDB/XQuery
MS SQL Server 2005Saxon
Zorbahttp://www.rpbourret.com/xml/ProdsNative.htm
XQuery processors
http://exist-db.org
Stream
vs
Storage
XQuery processors
http://exist-db.org
XML-enabled
VS
Native XML
Этапы развития
http://exist-db.org
4th generation of databases
Поколения
Juha Kontio
http://exist-db.org
http://exist-db.org/
XML Database
http://exist-db.org
U.S. State Department Office of the Historian website
reBiND project easyDITA
University of Heidelberg
University of Richmond
…..
Томский Политехнический Университет http://tpu.ru
ЗАО «МЦФЭР» http://mcfr.ru
Кто использует?
http://exist-db.org
I have successfully stored over 16,000,000 XML documents in eXist-db … 1KB - 4KB each (~30Gb).
Querying was still possible…, so it must have been 3< seconds.
Adam Retter
Как использует?
http://exist-db.org
● REST (URL Rewriting)● WebDAV● Security:
● multiple realmsLDAP, OAuth, OpenID
● Unix permissions model (bitmap)● Access control list
● XQuery 3.0● XSL (Saxon)● EXPath: packaging & modules
XML Database
http://exist-db.org
● Content Extraction and Binary Resource Indexing● Lucene● JSON & HTML 5 serializer● «Applications» concept
XML Database
http://exist-db.org
Быстро состряпать форму для сбора данных
и дальнейший анализ
сохраненных данных.
Что можно сделать?
http://exist-db.org
Сбор и обработка данных
Что можно сделать?
http://exist-db.org
Браузер читающий твиты используя механизм text-to-speech встроенный в браузер.
Что можно сделать?
http://exist-db.org
Разработать CMS или
систему управления бизнес процессамидля вашей организации.
Что можно сделать?
http://exist-db.org
<oXygen/> XML editor
eXide — web IDE
IDE
http://exist-db.org
<oXygen/> XML editor
http://exist-db.org
eXide IDE
http://exist-db.org
Concepts: XRX
http://exist-db.org
RESTXQAdam Retter's
XML Prague 2012 paper
declare
%rest:path(“/say/hello/{$name}”)
function local:say-hello($name) {<hello>{$name}</hello>
};
Concepts: RESTXQ
http://exist-db.org
Database next stage: Applications container
Concepts: Applications
http://exist-db.org
Вопросы и
возможно даже ответы
....
http://exist-db.org
Пожалуйста, поставьте оценку моему докладу.
Ваше мнение очень важно.
Спасибо!
.