J
joe
Here is what I want to do go through an xhtml look for my custom tags
and call methods based on the tag names and take the output from the
tag and put it into the xhtml.
Take the following xhtml:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmls:nx="my.test.namespace">
<head>
<title>simple document</title>
</head>
<body>
<p>some paragraph
<nx:test name="joe"/>
</p>
</body>
</html>
and turn it into this:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmls:nx="my.test.namespace">
<head>
<title>simple document</title>
</head>
<body>
<p>some paragraph
Hello my name is joe
</p>
</body>
</html>
Now I know that I can use SAX and a ContentHandler to find my custom
tags and call the methods that is the easy part. I guess my question is
with a ContentHandler how would re-write the rest of the document ?
and call methods based on the tag names and take the output from the
tag and put it into the xhtml.
Take the following xhtml:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmls:nx="my.test.namespace">
<head>
<title>simple document</title>
</head>
<body>
<p>some paragraph
<nx:test name="joe"/>
</p>
</body>
</html>
and turn it into this:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmls:nx="my.test.namespace">
<head>
<title>simple document</title>
</head>
<body>
<p>some paragraph
Hello my name is joe
</p>
</body>
</html>
Now I know that I can use SAX and a ContentHandler to find my custom
tags and call the methods that is the easy part. I guess my question is
with a ContentHandler how would re-write the rest of the document ?