Using oXygen Using oXygen to build and execute XQuery applications on eXist Date: September 2008 Dan...
-
Upload
amber-murphy -
Category
Documents
-
view
219 -
download
2
Transcript of Using oXygen Using oXygen to build and execute XQuery applications on eXist Date: September 2008 Dan...
Using oXygenUsing oXygen to build and execute
XQuery applications on eXistDate: September 2008
Dan McCrearyPresidentDan McCreary & [email protected](952) 931-9198
M
D
Metadata Solutions
Copyright 2008 Dan McCreary & Associates 2
M
D
Overview• Why oXygen?• Screen layout• Customizing screen layout
– Toolbar– Perspectives
• Editing• Using the XPath Builder
Copyright 2008 Dan McCreary & Associates 3
M
D
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
Copyright 2008 Dan McCreary & Associates 5
M
D
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
Copyright 2008 Dan McCreary & Associates 7
M
D
Connection to Localhost
XML DB URI: xmldb:exist://localhost:8080/exist/xmlrpc
Copyright 2008 Dan McCreary & Associates 8
M
D
Windows WebDAV Folder
http://localhost:8080/exist/webdav/db
Copyright 2008 Dan McCreary & Associates 9
M
D
WebDAV vs ReST
• When using the windows Add Network Place make sure to use the WebDAV url
http://localhost:8080/exist/rest/db
http://localhost:8080/exist/webdav/db
Web Browser (to execute any XQuery)
Windows File System (drag and drop)
Copyright 2008 Dan McCreary & Associates 11
M
D
Major Screen Areas
• Database browser
• Editor– note the tabs on the top
• XPath Expression Builder
Copyright 2008 Dan McCreary & Associates 12
M
D
Hello World in XQuery
xquery version "1.0";
let $message := 'Hello World'
return $message
Copyright 2008 Dan McCreary & Associates 14
M
D
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
Copyright 2008 Dan McCreary & Associates 16
M
D
Executing on eXist
oXygen
eXist “jars”
XQueryXML
Output
eXist
Copyright 2008 Dan McCreary & Associates 18
M
D
HTML Rendering Within oXygen
• Configure oXygen to render resultsdirectly into web browser view
• Note this is part of the transformation scenario
CheckHere
Copyright 2008 Dan McCreary & Associates 20
M
D
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
Copyright 2008 Dan McCreary & Associates 21
M
D
Toolbars
• Can be customized to your preferences
• Highly recommended for this class:– File– Edit– Transformation– XPath
Copyright 2008 Dan McCreary & Associates 23
M
D
Saving Your Perspective
• This will save the positions of all your views within oXygen.
Copyright 2008 Dan McCreary & Associates 24
M
D
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
Copyright 2008 Dan McCreary & Associates 26
M
D
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, PresidentDan McCreary & Associates
Metadata Strategy [email protected]
(952) 931-9198