Extracting data from an XHTML file with XQuery
Posted: Thu Sep 18, 2008 2:41 pm
Hi all,
I have an XHTML document as follows:
which I call index.html .
I also have the following XQuery files:
which I call test_one.xquery, and:
which I call test_two.xquery .
When I use the XQuery debugging view in Oxygen, and select index.html as my XML file, test_one.xquery as my XQuery file and Saxon-B as my XQuery engine in the Control Toolbar, running the XQuery gives the following output:
But when I do the same thing with test_two.xquery selected instead, I get the following output:
Why is it that test_two.xquery gives no output (aside from the XML header line)?
Thanks in advance for your help!
Sam
I have an XHTML document as follows:
Code: Select all
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Foo</title>
</head>
<body>Bar</body>
</html>
I also have the following XQuery files:
Code: Select all
for $markup in /*
return $markup
Code: Select all
for $markup in /html/*
return $markup
When I use the XQuery debugging view in Oxygen, and select index.html as my XML file, test_one.xquery as my XQuery file and Saxon-B as my XQuery engine in the Control Toolbar, running the XQuery gives the following output:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Foo</title>
</head>
<body>Bar</body>
</html>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
Thanks in advance for your help!
Sam