[jdom-interest] question on namespaces

Frank Sauer Frank.Sauer at trcinc.com
Thu May 30 08:59:47 PDT 2002


I apologize if this is a FAQ, but I could not find it there or in the archives.

I have a need to process files much like XSLT files that look like this:

<fpl:frame xmlns:fpl="some uri">

	<fpl:break name="script">
		<script>
		
		</script>
	</fpl:break>
	<body>
		<fpl:break name="header">
		
		</fpl:break>
	</body>
</fpl:frame>

In other words, I need to process the elements in the namespace
identified by the fpl: prefix but simply consider everything else as content.
Can anyone out there show me how to set up jdom to do this?
Can validation be used in this scenario? I have a DTD for the fpl tags but it
does not use namespaces. Can it? What's a good place to find info on this?
I used the jdom node factory to instantiate my own Element subclasses for the
recognized fpl commands, but now I have a need to add namespaces to it so it is
easier to include xml/html like content without the need for CDATA.

Thanks,

Frank Sauer
The Technical Resource Connection, Inc.
a wholly owned subsidiary of Perot Systems
Tampa, FL
http://www.trcinc.com
-----------------------------------------------
"If you don't know where you're going, any road will take you there" --
Lewis Carroll






More information about the jdom-interest mailing list