Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to specify namespace source file location

843834Feb 14 2002 — edited Apr 12 2002
Anybody know how I can find out what namespace capabilities work with
the JAXP parsers (including validation) and transformers?

According to the just-released JWS tutorial, "At this point in time, the
Java XML parsers do not support namespaces"
(file:///jwsdp-1_0-ea1/docs/tutorial/doc/JAXPDOM7.html#65124), yet
(1) I have working xsl files (style sheets), and Xsl style sheets use name
spaces:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

and (2) elsewhere, when a name collision incident arises, the same tutorial
says "You could also use XML namespaces to resolve the conflict."
(file:///jwsdp-1_0-ea1/docs/tutorial/doc/JAXPSAX13.html#65449)


The tutorial page referenced above gives an example of using manually
defining the xmlns attribute for individual elements in your DTD, and
it says that because "the parser understands the xmlns attribute",
it does not conflict with another element that has the same element name
in another DTD. But I have coded it and the parser validators fail,
saying that the element cannot be defined twice.

I figure there must be more robust support for namespaces that than hokey
scheme, because the stylesheet line above somehow finds source for the
XSL Transform source. But, unfortunatly, I do not own a namespace whose
source location is automatically known to the browser, and when I try to
specify a schemaLocation (as described in Castro's "XL for the WWW"), it
doesn't come close to validating. The first page of the tutorial gives
losts of examples on how to specify a namespace (including using prefixes),
but they never say a word about how to specify the source of the actual
code, either with schemaLocation= or some other method.


Any info or insight greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2002
Added on Feb 14 2002
4 comments
168 views