Using oXygen Using oXygen to build XRX applications Date

Download Report

Transcript Using oXygen Using oXygen to build XRX applications Date

Using oXygen
Using oXygen to build and execute
XQuery applications on eXist
Date: September 2008
M
D
Metadata Solutions
Dan McCreary
President
Dan McCreary & Associates
[email protected]
(952) 931-9198
Overview
• Why oXygen?
• Screen layout
• Customizing screen layout
– Toolbar
– Perspectives
• Editing
• Using the XPath Builder
M
D
Copyright 2008 Dan McCreary & Associates
2
Why oXygen?
• Tools are Important
• oXygen has become the premiere tool
for working with native XML databases
• oXygen will be our primary XQuery
development tool
• It is important that people feel
comfortable with both the tools and the
theory behind XQuery
• Getting to know your tools will make
you more productive
M
D
Copyright 2008 Dan McCreary & Associates
3
oXygen Data Sources
Tools -> Preferences
M
D
Copyright 2008 Dan McCreary & Associates
4
3 “jar” files
• This files are part of
the eXist distribution
but are used by
oXygen to connect to
the database
• The files are:
– exist.jar
– xmldb.jar
– xmlrpc-1.2-patched.jar
M
D
Copyright 2008 Dan McCreary & Associates
5
Data Source Drivers
M
D
Copyright 2008 Dan McCreary & Associates
6
Connection to Localhost
XML DB URI: xmldb:exist://localhost:8080/exist/xmlrpc
M
D
Copyright 2008 Dan McCreary & Associates
7
Windows WebDAV Folder
http://localhost:8080/exist/webdav/db
M
D
Copyright 2008 Dan McCreary & Associates
8
WebDAV vs ReST
Web Browser (to execute any XQuery)
http://localhost:8080/exist/rest/db
Windows File System (drag and drop)
http://localhost:8080/exist/webdav/db
• When using the
windows Add Network
Place make sure to use
the WebDAV url
M
D
Copyright 2008 Dan McCreary & Associates
9
M
D
Copyright 2008 Dan McCreary & Associates
10
Major Screen Areas
• Database browser
• Editor
– note the tabs on the top
• XPath Expression Builder
M
D
Copyright 2008 Dan McCreary & Associates
11
Hello World in XQuery
xquery version "1.0";
let $message := 'Hello World'
return $message
M
D
Copyright 2008 Dan McCreary & Associates
12
Execute
Validity
input
output
M
D
Copyright 2008 Dan McCreary & Associates
13
Transformation Scenario
• A transformation senerio is a specific
configuration on how you want to run your
transforms
• You can use oXygen’s built-in Saxon XQuery
processor for doing standard XQuery testing on
small local files
• Saxon is highly compliant with XQuery 1.0 and
because it runs as part of oXygen you can do
advanced stepwise debugging within oXygen
• You will not be able to use Saxon if you are using
any of eXist’s XQuery extension in your XQuery
M
D
Copyright 2008 Dan McCreary & Associates
14
Testing with Saxon
oXygen
XML
Output
XQuery
Saxon
M
D
Copyright 2008 Dan McCreary & Associates
15
Executing on eXist
oXygen
XQuery
XML
Output
eXist
eXist “jars”
M
D
Copyright 2008 Dan McCreary & Associates
16
Return results from eXist to oXygen
M
D
Copyright 2008 Dan McCreary & Associates
17
HTML Rendering Within oXygen
Check
Here
M
• Configure oXygen to render results
directly into web browser view
• Note this is part of the transformation scenario
D
Copyright 2008 Dan McCreary & Associates
18
HTML Output in Lower Window
M
D
Copyright 2008 Dan McCreary & Associates
19
Note
• Many context-aware functions that will run
correctly if executed from a browser may not run
within oXygen
• There is currently no way to configure what
rendering engine oXygen uses (IE, FireFox,
Chrome etc)
• For best results, test in at least two different
browsers, especially if you are using complex CSS
files
M
D
Copyright 2008 Dan McCreary & Associates
20
Toolbars
• Can be customized to your preferences
• Highly recommended for this class:
–
–
–
–
File
Edit
Transformation
XPath
M
D
Copyright 2008 Dan McCreary & Associates
21
Configure
Toolbars
M
D
Copyright 2008 Dan McCreary & Associates
22
Saving Your Perspective
• This will save the positions of all your views
within oXygen.
M
D
Copyright 2008 Dan McCreary & Associates
23
Subversion
• Version control system
• Examples stored at Google Code
– http://xrx.googlecode.com/svn/trunk/
• You can “checkout” a read-only copy using
Subversion’s Subversion Client (Syncro
SVN)
• From oXygen:
– Tools -> SVN Client
M
D
Copyright 2008 Dan McCreary & Associates
24
Subversion Access
M
D
Copyright 2008 Dan McCreary & Associates
25
Thank You!
Please contact me for more information:
•
•
•
•
•
•
Metadata Management Services
Web Services
Service Oriented Architectures
Business Intelligence and Data Warehouse
Metadata Registries
Semantic Web
Dan McCreary, President
Dan McCreary & Associates
Metadata Strategy Development
[email protected]
(952) 931-9198
M
D
Copyright 2008 Dan McCreary & Associates
26