xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] Setting schema declaration on root element
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: Daniel Rohlfs <drohlfs AT gmx.net>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Setting schema declaration on root element
- Date: Wed, 29 Nov 2006 10:57:42 -0500
You have to specify the namespace URI when creating an attribute in a namespace. See the JavaDoc but this should work:
Attribute schemaDecl = new Attribute("xsi:noNamespaceSchemaLocation", "http://www.w3.org/2001/XMLSchema-instance", "assetpos.xsd");
XOM has no way to no which namespace declarations may be in scope on which other elements elsewhere in your program. There's no global namespace context it can read from.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/
-
[XOM-interest] Setting schema declaration on root element,
Daniel Rohlfs, 11/29/2006
-
Re: [XOM-interest] Setting schema declaration on root element,
Elliotte Harold, 11/29/2006
- Re: [XOM-interest] Setting schema declaration on root element, Daniel Rohlfs, 11/29/2006
-
Re: [XOM-interest] Setting schema declaration on root element,
Elliotte Harold, 11/29/2006
Archive powered by MHonArc 2.6.24.