Database Reference
In-Depth Information
Figure 3-3. Hamlet opened in eXide
Alternatively, you can view the XML file in a browser through eXist's REST interface
(see “Querying the Database Using REST” on page 94 ). Simply visit http://localhost:
8080/exist/rest/db/apps/exist101/data/hamlet.xml .
But wait, it's not working! You should get an error message about a shakes.xsl style‐
sheet not being found. Crime doesn't pay: it's our punishment for being a data thief!
The problem is that the XML files we started with were part of an application and
were coupled to an XSL stylesheet by a processing instruction. This stylesheet, meant
to create an HTML version of the play, was not copied by us and therefore, alas,
could not be found. There's more about using XSLT via processing instructions in
“Invoking XSLT by Processing Instruction” on page 242 .
Fear not; the problem is easily solved. Open hamlet.xml (again) in eXide and look at
the first line. It begins with:
<?xml-stylesheet href="shakes.xsl" type="text/xsl"?>
Remove this processing instruction using eXide, save the file, and try the URL again.
You should now see hamlet.xml in all its XML glory.
 
Search WWH ::




Custom Search