XQueryってどんなもの?

Similar documents
UbiquitousMetadata活用-3

XML XML (Extensible Markup Language) ISO SGML (Standard Generalized Markup Language) W3C (World Wide Web Consortium) XML 1.0

XMLテクノロジを使いやすくする

G-XML

Level1_ key

untitled

122.pdf

OOW_I06

TitleWeb における画像とテキストの融合 Author(s) 安岡, 孝一 Citation (2003): 1-12 Issue Date URL Right Type Conference Paper

3. XML, DB, DB (AP). DB, DB, AP. RDB., XMLDB, XML,.,,.,, (XML / ), XML,,., AP. AP AP AP 検索キー //A=1 //A=2 //A=3 返却 XML 全体 XML 全体 XML 全体 XMLDB <root> <A

コンピュータグラフィックス - 第4回 色彩の表現

rzamjpdf.ps

分散情報システム構成法

XISによる効率良いシステム開発のポイント

新しいイテレーション型開発

XSLT 4-1

SVG資料第6回目(その3) SVGとHTMLの間でデータを交換する

XML基礎


ppt

n n n ( ) n Oracle 16 PostgreSQL 3 MySQL

オントロジ入門

OSC_isshiki_090710c.ppt

XMLとは、eXtensible Markup Languageの略で、拡張可能なマーク付け言語である

1 1 2 Unix SVG SVG SVG SVG

untitled

PowerPoint プレゼンテーション

() < > </ > / HTML SGML HTML 1.1 DTD DTD ( DTD (prolog) )SGML 1. DTD ( ) 2. DTD <!-- DTD-- > <!ELEMENT MAIL - - ((TO,FROM)?,DATE?,BODY) > <!ELEMENT TO

スライド タイトルなし

Encryption Security

スライド 1

Testing XML Performance

橡SPA2000.PDF

WS-I Basic Profile 1.0 の概説

_02_3.ppt

AlloraマッパーにおけるXpriori・XMSデータベースの使用方法

Oracle JDeveloper 10g ADF Creation Date: Jul 07, 2004 Last Update: Jul 08, 2004 Version 1.0

shimizu_thesis03.dvi

HTML文書の作成

OSF2009発表用抜粋版 A4.ppt

1,.,,,., RDBM, SQL. OSS,, SQL,,.

paper.pdf

Lotus Domino XML活用の基礎!

XML Consortium XML XML Consortium Canon, Inc. Yoshikazu Yokomizo XML Consortium HTML CSS1 CSS2 XSL 1.0 XSLT V1.0 XPath 1.0 XML Base XML Sche

Oracle XDK(10.1.2)の技術概要

# let st1 = {name = "Taro Yamada"; id = };; val st1 : student = {name="taro Yamada"; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n

3 3.1 SSedit ua012345% ssedit SuperSQL config.ssql log.txt( logs.txt) SSedit SSedit 3.2 ssql Putty SSedit ua012345% ssql HTML /public html/ssql.ssql 4

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

橡dbweb2002-sato.PDF

Web (RDF) RDF RSS FOAF RDF Web RDF RDF google rdf filetype:rdf rdf Web 122, , [1] ( ) [2] RDF RSS 6

_02-4.ppt

XML Consortium & XML Consortium 1 XML Consortium XML Consortium 2

G-XML EWEB-3K-N064

WS-I Basic Profile 1.0 の概説

ValueHolder... 9 Customer.java Oracle TopLink 10g(10.1.3) È Volume3 2

\\afs001-0m0005\project02\A32\M

Microsoft PowerPoint - 05XMLによるデータの表現.pptx

Let s TENNIS! Summer

データ連携ソリューションスイート 「ASTERIA WARP」  ご紹介資料

/var/lib/sharelatex/data/compiles/5b35c6e168aeba3d a72a7acd11f6ba07fbbff68/output.dvi

tkk0408nari

Oracle Lite Tutorial

※サンプルアプリケーションを固めたファイル(orcasample

untitled

Oracle XML DB によるスケーラビリティおよびパフォーマンス検証 - MML v.3.0

情報システム 第6回講義資料

E MathML W3C MathJax 1.3 MathJax MathJax[5] TEX MathML JavaScript TEX MathML [8] [9] MathSciNet[10] MathJax MathJax MathJax MathJax MathJax MathJax We

_02-5.ppt

XML Week Web 2.0 Day (1) SOA2.0 KM2.0? REST API + XSLT Amazon hon. hon.jp API XML Consortium XML ( ) REST(GET)API Amazon.co.jp hon.jp REST

スライド 1

インターネットマガジン2000年12月号―INTERNET magazine No.71

DEIM Forum 2013 B5-2 RMX RMX RMX $, RMX Implementation of the E-m

_...j.f......_..

Condition DAQ condition condition 2 3 XML key value

TopLink å SampleClient.java... 5 Ò readallsample() querysample() cachesample() Ç..

"-./0%. "-%!"#$#% $%&'(%)*+,%.!"#+$,$% &'()*% $%&'-(.(/%+,% $%&'0%12*+,'% 1 RMX.. grade gradetype= integer grade[

「Android Studioではじめる 簡単Androidアプリ開発」正誤表

TopLink È... 3 TopLink...5 TopLink åø... 6 TopLink å Workbench O/R ~... 8 Workbench À ~... 8 Foundation Library å... 8 TopL

ucR/XML: XML によるucR graph のシリアライズ

WebOS aplat WebOS WebOS 3 XML Yahoo!Pipes Popfry UNIX grep awk XML GUI WebOS GUI GUI 4 CUI

橡13解説.PDF

CAC

Oracle Lite Tutorial

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版  

Microsoft Word S312-UCR_spatial_network仕様書 doc

Vol.56 No (Mar. 2015) Canvas SVG HTML Web Viewport Library UML Canvas SVG 1,000 HTML SVG Viewport Library Viewport Library HTML HTML Web H

Microsoft Word - 検証結果まとめ_ doc

2009 Web B012-1

IT / KPI IT WF(XOML),BPEL WSDL XSD IT XSD WSDL BPEL XOML XML

PowerPoint プレゼンテーション

情報の構造とデータ処理

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

Oracle9i JDeveloperによるWebサービスの構築

XML XML XML XML XML XML XSL-FO XML XSL Formatter XSL XSL-FO XML XSL Formatter XML 1. XSL Formatter 2. D XML /XML 3. S XSL 4. O F

PowerPoint プレゼンテーション

csj-report.pdf

Adobe Media Encoder ユーザーガイド

PowerPoint プレゼンテーション

Transcription:

2 XML Week XML XML XML-DB WG NTT ( ) ymmt@po.ntts.co.jp chiba@isid.co.jp obamikio@jp.ibm.com

XQuery SQL SQL SQL

XQuery SQL XML

XQuery XML XML XPath XML XPath XML XPath XPath XML XML

XQuery XML XML XPath XPath <students> <student name=" "> <teacher> </teacher> </student> <student name=" "> <teacher> </teacher> </student> <students> /students/student[@name=" "] <student name=" "> <teacher> </teacher> </student>

XQuery XML XML XPath <students> <teacher name=" "> <student name=" "> <student> </student> <teacher> </teacher> <student> </student> </student> </teacher> <student name=" "> <teacher> </teacher> </student> <students> XML

XQuery XML XML XPath XSLT XSLT XPath XML XSLT

XQuery XML XML XPath XSLT XPath XSLT XML!! XQuery XQuery!!

XML XML XML XML

XML XML XML XML SQL XML SQL

XML XML XML XML XML SQL XQuery

XML XML XML (Join)

XML XML XML XML XML

XML XML XQuery unordered ( ) unordered unordered( for $p in doc("parts.xml")//part[color = "Red"], $s in doc("suppliers.xml")//supplier where $p/suppno = $s/suppno return <ps> { $p/partno, $s/suppno } </ps> ) XQuery

XML Query XQL99 XQL98 XPath XSLT XUL excelon XML-QL XSQL Oracle XML XML OODBQuery OODBQuery XPointer RDBQuery RDBQuery SQL OQL QUILT XQuery XQL XSLT XPath XML XML-QL SQL XQL XML-QL QUILT XQuery QUILT W3C XML

XQuery W3C Working Draft (www.w3.org/xml/query) XML Query Requirements (5/2/2003) XML Query Use Cases (5/2/2003) :11/15/2002 http://www.xmlconsortium.org/wg/tech/wd-xmlquery-use-cases-20021115-japan-clean.htm XQuery1.0 and XPath2.0 Data Model (LAST CALL) (5/2/2003) XSLT 2.0 and XQuery 1.0 Serialization (5/2/2003) XQuery1.0 and XPath2.0 Formal Semantics (5/2/2003) XQuery1.0: An XML Query Language (5/2/2003) XML Syntax for XQuery1.0 (XQueryX) (6/7/2001) XQuery1.0 and XPath2.0 Functions and Operators (LAST CALL)(5/2/2003) XPath Requirements Version2.0 (2/14/2001) XML Path Language (XPath)2.0 (5/2/2003) :8/16/2002 Document WG http://www.xmlconsortium.org/wg/tech/wd-xpath20-20020816-japan-without-appendix.htm XML Query and XPath Full-Text Requirements (5/2/2003) XML Query and XPath Full-Text Use Cases (2/14/2003) Document WG

XQuery Expression XQuery 2003/05/03 Working Draft FLWOR Path

Path $ QName $b $val FLWOR typeswitch Path XML Path Language (XPath)2.0 /doc/chapter[title="introduction"]

XQuery XQuery1.0 and XPath2.0 Functions and Operators op:numeric-add fn:round fn:concat fn:contains fn:replace fn:local-name fn:deep-equal fn:empty fn:insert-before fn:sum fn:doc

XML Direct Element Constructor XML curly braces { } Computed Constructor element attribute document text <title isbn= isbn-0060229357 > { $b/title } </title> element title { "Harold and the Purple Crayon" } { attribute isbn { "isbn-0060229357" } }

FLWOR 1 F L W O R FOR LET WHERE ORDER BY RETURN flower əʊə XML JOIN XML FLWOR FLWOR

FLWOR 2 FOR for in (, in )* Cartesian tuple stream iteration LET let := (, in )* tuple stream FOR FOR FOR

FLWOR 3 WHERE where FOR LET tuple stream true false ORDER BY order by tuple stream collation empty

FLWOR 4 RETURN return FLWOR tuple stream

XML Query Use Cases 9 ( XMP ) ( TREE ) ( SEQ ) ( R ) ("SGML") Standard Generalized Markup Language ( STRING ) ( NS ) ( PARTS ) ("STRONG")

XML Query Use Cases Use Case 1 1991 Addison-Wesley (Use Case XMP Q1) Use Case 2 Bicycle itemno description bid Use Cases R Q2

Use Case 1 1991 Addison-Wesley (Use Case XMP Q1)

XML bib.xml <bib> <book year="1994"> <title>tcp/ip Illustrated</title> <author> <>Stevens</> <>W.</> </author> <publisher>addison-wesley</publisher> <price> 65.95</price> </book> XML Query Use Cases <book year="2000"> <title>data on the Web</title> <author> <>Abiteboul</> <>Serge</> </author> <author> <>Buneman</> <>Peter</> </author> <author> <>Suciu</> <>Dan</> </author> <publisher>morgan Kaufmann Publishers</publisher> <price>39.95</price> </book> </bib>

bib.xml bib book book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan Kaufmann Publishers 39.95 Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

XQuery 1 1991 Addison-Wesley (Use Case XMP Q1) XQuery

XQuery 1 1 bib book year 1994 title TCP/IP Illustrated author Stevens W. publisher price Addison -Wesley 65.95 book year 2000 title Data on the Web author Abiteboul Peter publisher price Morgan Kaufmann Publishers 39.95 author Suciu Serge author Buneman Dan

XQuery 1 2 bib $b = book book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan Kaufmann 39.95 Publishers Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

XQuery 1 3 WHERE bib $b = book book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan Kaufmann 39.95 Publishers Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

XQuery 1 4 return <book year= 1994 > <title>tcp/ip Illustrated</title> </book> bib $b = book book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan Kaufmann 39.95 Publishers Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

XQuery 1 5 bib book $b = book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan Kaufmann Publishers 39.95 Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

XQuery 1 6 bib WHERE book $b = book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan 39.95 Kaufmann Publishers Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

XQuery 1 7 XQuery <bib> <book year= 1994 > <title>tcp/ip Illustrated</title> </book> </bib> bib book book year title author publisher price year title author author author publisher price 1994 TCP/IP Illustrated Addison -Wesley 65.95 2000 Data on the Web Morgan Kaufmann 39.95 Publishers Stevens W. Abiteboul Serge Buneman Peter Suciu Dan

Use Case 2 Bicycle itemno description bid Use Cases R Q2

ITEMS BIDS 25 1999-03-06 1999-02-05 U01 Broken Bicycle 1008 200 1999-02-20 1999-01-20 U04 Racing Bicycle 1007 50000 1999-05-25 1999-05-05 U03 Helicopter 1006 20 1999-04-30 1999-03-19 U03 Tennis Racket 1005 15 1999-03-08 1999-02-25 U01 Tricycle 1004 25 1999-02-20 1999-01-10 U02 Old Bicycle 1003 500 1999-03-15 1999-02-11 U02 Motorcycle 1002 40 1999-01-20 1999-01-05 U01 Red Bicycle 1001 RESERVE _PRICE END_DATE START_DATE OFFERED _BY DESCRIPTION ITEMNO 1999-02-12 225 1007 U04 1999-02-08 200 1007 U05 1999-01-25 175 1007 U03 1999-03-05 40 1004 U01 1999-02-03 20 1003 U05 1999-01-22 15 1003 U04 1999-03-02 1200 1002 U02 1999-02-25 1000 1002 U04 1999-02-17 800 1002 U03 1999-02-16 600 1002 U02 1999-02-14 400 1002 U01 1999-01-15 55 1001 U02 1999-01-13 50 1001 U04 1999-01-11 45 1001 U02 1999-01-08 40 1001 U04 1999-01-07 35 1001 U02 BID_DATE BID ITEMNO USERID

XML items.xml items.xml

XML bids.xml bids.xml

XQuery 2 Bicycle itemno description bid Use Cases R Q2 XQuery

XQuery 2 1 <result> { for $i in doc("items.xml")//item_tuple let $b := doc("bids.xml")//bid_tuple[itemno = $i/itemno] where contains($i/description, "Bicycle") order by $i/itemno return <item_tuple> { $i/itemno } { $i/description } <high_bid>{ max($b/bid) }</high_bid> </item_tuple> }</result> items bids $i = item_tuple bid_tuple $b = itemno description offered_by start_date end_date reserve_price userid itemno bid bid_date XML JOIN

XQuery 2 2 <result> { for $i in doc("items.xml")//item_tuple let $b := doc("bids.xml")//bid_tuple[itemno = $i/itemno] where contains($i/description, "Bicycle") order by $i/itemno return <item_tuple> { $i/itemno } { $i/description } <high_bid>{ max($b/bid) }</high_bid> </item_tuple> }</result> JOIN $i = $b = ITEMNO 1001 DESCRIPTION Red Bicycle OFFERED _BY U01 START_DATE 1999-01-05 END_DATE 1999-01-20 RESERVE _PRICE 40 USERID U02 U04 ITEMNO 1001 1001 BID 35 40 BID_DATE 1999-01-07 1999-01-08 U02 1001 45 1999-01-11 U04 1001 50 1999-01-13 U02 1001 55 1999-01-15

XQuery 2 3 <result> { for $i in doc("items.xml")//item_tuple let $b := doc("bids.xml")//bid_tuple[itemno = $i/itemno] where contains($i/description, "Bicycle") order by $i/itemno return <item_tuple> { $i/itemno } { $i/description } <high_bid>{ max($b/bid) }</high_bid> </item_tuple> }</result> $i = $b = ITEMNO 1001 DESCRIPTION Red Bicycle OFFERED _BY U01 START_DATE 1999-01-05 END_DATE 1999-01-20 RESERVE _PRICE 40 USERID U02 U04 ITEMNO 1001 1001 BID 35 40 BID_DATE 1999-01-07 1999-01-08 U02 1001 45 1999-01-11 U04 1001 50 1999-01-13 U02 1001 55 1999-01-15

XQuery 2 4 <result> { for $i in doc("items.xml")//item_tuple let $b := doc("bids.xml")//bid_tuple[itemno = $i/itemno] where contains($i/description, "Bicycle") order by $i/itemno return <item_tuple> { $i/itemno } { $i/description } <high_bid>{ max($b/bid) }</high_bid> </item_tuple> }</result> $i = $b = ITEMNO DESCRIPTION OFFERED _BY START_DATE END_DATE RESERVE _PRICE USERID U02 ITEMNO 1001 BID 35 BID_DATE 1999-01-07 1001 Red Bicycle U01 1999-01-05 1999-01-20 40 U04 1001 40 1999-01-08 U02 1001 45 1999-01-11 item_tuple U04 U02 1001 1001 50 55 1999-01-13 1999-01-15 itemno description high_bid max( )

XQuery 2 5 <result> { for $i in doc("items.xml")//item_tuple let $b := doc("bids.xml")//bid_tuple[itemno = $i/itemno] where contains($i/description, "Bicycle") order by $i/itemno return <item_tuple> { $i/itemno } { $i/description } <high_bid>{ max($b/bid) }</high_bid> </item_tuple> }</result> result item_tuple item_tuple item_tuple item_tuple itemno description high_bid itemno description high_bid itemno description high_bid itemno description high_bid 1001 Red Bicycle 55.0 1003 Old Bicycle 20.0 1007 Racing Bicycle 225.0 1008 Broken Bicycle order by

XQuery 2 6 <result> <item_tuple> <itemno>1001</itemno> <description>red Bicycle</description> <high_bid>55.0</high_bid> </item_tuple> <item_tuple> <itemno>1003</itemno> <description>old Bicycle</description> <high_bid>20.0</high_bid> </item_tuple> <item_tuple> <itemno>1007</itemno> <description>racing Bicycle</description> <high_bid>225.0</high_bid> </item_tuple> <item_tuple> <itemno>1008</itemno> <description>broken Bicycle</description> <high_bid></high_bid> </item_tuple> </result>

SVG XQuery SVG Scalable Vector Graphics W3C XML http://www.w3.org/tr/svg/ rect circle text SVG XQuery

SVG SVG <?xml version= 1.0 encoding= UTF-8?> <svg xmlns:svg='http://www.w3.org/2000/svg' width='100mm' height='100mm' viewbox='0 0 100 100'> <circle cx='20' cy='20' r='15' fill="#ff0000" stroke="#000000" stroke-width="0.3"/> </svg> SVG 20 x RGB #FF0000 20 15 y

SVG XML-DB (NeoCore) XQueryViewer XML-DB (Xquery Apache XML Project Batik 1.5 (SVG Library) Java Foundation Class (Swing) Java SDK 1.4

SVG SVG Xquery

[ ] SVG 1 SVG circle1.svg 5 10 15 20 25 30

[ ] SVG 2 SVG circle1.svg <?xml version="1.0" encoding="utf-8" standalone="no"?> <svg xmlns='http://www.w3.org/2000/svg' width='100mm' height='100mm' viewbox='0 0 100 100'> <g> <circle cx='15' cy='15' r='5' fill="#ff0000" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='15' cy='65' r='5' fill="#ff0000" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='65' cy='65' r='5' fill="#ff0000" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='65' cy='15' r='5' fill="#ff0000" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='20' cy='20' r='10' fill="#ff0033" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='20' cy='60' r='10' fill="#ff0033" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='60' cy='60' r='10' fill="#ff0033" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='60' cy='20' r='10' fill="#ff0033" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='25' cy='25' r='15' fill="#ff0066" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='25' cy='55' r='15' fill="#ff0066" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='55' cy='55' r='15' fill="#ff0066" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='55' cy='25' r='15' fill="#ff0066" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='30' cy='30' r='20' fill="#ff0099" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='30' cy='50' r='20' fill="#ff0099" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='50' cy='50' r='20' fill="#ff0099" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='50' cy='30' r='20' fill="#ff0099" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='35' cy='35' r='25' fill="#ff00cc" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='35' cy='45' r='25' fill="#ff00cc" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='45' cy='45' r='25' fill="#ff00cc" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='45' cy='35' r='25' fill="#ff00cc" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> <circle cx='40' cy='40' r='30' fill="#ff00ff" fill-opacity="0.2" stroke="#000000" stroke-width="0.3"/> </g> </svg>

[ ] SVG 3 20 <svg xmlns='http://www.w3.org/2000/svg' width='100mm' height='100mm' viewbox='0 0 100 100'> { for $c in document("circle1.svg")/svg//circle where $c/@r < 20 return <g> { $c } </g> }</svg> 20 <svg xmlns='http://www.w3.org/2000/svg' width='100mm' height='100mm' viewbox='0 0 100 100'> { for $c in document("circle1.svg")/svg//circle where $c/@r > 20 return <g> { $c } </g> }</svg>

[ ] SVG 4 20 20

[ ] SVG 5 SVG rect1.svg 10 10 4 4

[ ] SVG 6 SVG circle1.svg <?xml version="1.0" encoding="utf-8" standalone="no"?> <svg xmlns='http://www.w3.org/2000/svg' width='40mm' height='40mm' viewbox='0 0 40 40'> <g> <rect x='0' y='0' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='10' y='0' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='20' y='0' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='30' y='0' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='0' y='10' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='10' y='10' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='20' y='10' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='30' y='10' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='0' y='20' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='10' y='20' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='20' y='20' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='30' y='20' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='0' y='30' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='10' y='30' width='10' height='10' fill="#66ccff" stroke="none"/> <rect x='20' y='30' width='10' height='10' fill="#ff9933" stroke="none"/> <rect x='30' y='30' width='10' height='10' fill="#66ccff" stroke="none"/> </g> </svg>

[ ] SVG 7 x 2 <svg xmlns='http://www.w3.org/2000/svg' width='80mm' height='40mm' viewbox='0 0 80 40'> { for $r in document("rect1.svg")/svg//rect return <g> <rect x={$r/@x*2} y={$r/@y} width={$r/@width*2} height={$r/@height} fill={$r/@fill} stroke="none"/> </g> }</svg>

[ ] SVG 8

Demonstration XML DB NeoCore http://www.neocore.jp/ SVG