Setting up Oxygen for XQuery transformation

From Digital Scholarship Group
Jump to navigation Jump to search

First, go to oXygen's Options menu and select "Preferences". Type "XQuery" into the search bar at the top left. Select XML > XSLT-FO-XQuery > XQuery > Saxon-HE/PE/EE. Make sure "Enable XQuery 3.0 support" is checked, and hit "OK".

Now you're ready to create your first transformation. (The XQuery debugger won't be very helpful here, unfortunately, use the editor for this next bit.) Click on the button that has a wrench above a tiny play symbol. Select "New" to create a new scenario. The default XML and XQuery URLs are fine; you can ignore them. Click the drop-down menu for "Transformer" and select Saxon HE (PE and EE are fine too). Now click the "Output" button toward the top. Un-check "Present as sequence" and you'll have access to more fields. Select "Open in Editor" and make sure none of the options for "results view" are checked. When you've named the scenario, go ahead and hit "OK". Select your new scenario, then click "Apply associated". If all goes well, your results will show up as text in a new, untitled document.

If you still don't get any results, don't worry! Make sure you're using the right namespace in your XQuery. WWO uses TEI-esque elements in a special namespace. You can reference them using the prefix "wwp:" (Reception and Exhibits use regular TEI elements.)

Now that your preferences and scenario are configured, you can re-run your counting robot by hitting the big play button next to the wrench, or with Command+Shift+T.