xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Newton <anew...@research.netsol.com>
Subject schema and default attributes
Date Thu, 16 Nov 2000 18:39:22 GMT
Using Xerces 1.2.1, I'm having trouble getting default attributes working
when defined by an XML Schema.  The funny thing is, that when I run an
example through dom.DOMWriter with validation, it works.  But with my code
it doesn't.  Can anyone tell me what I've overlooked?  I've included a
sample program, sample documents, and the output.

epp$ java dom.DOMWriter -v test-att.xml
test-att.xml:
<?xml version="1.0" encoding="UTF-8"?>
<testRoot xmlns="http://www.foo.com/test" xmlns:t="http://www.foo.com/test" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:schemaLocation="http://www.foo.com/test test-att.xsd">

  <testElement test="default-text"></testElement>

</testRoot>



epp$ java test.Test test-att.xml
<?xml version="1.0" encoding="UTF-8"?>
<testRoot xmlns="http://www.foo.com/test"
  xmlns:t="http://www.foo.com/test"
  xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xsi:schemaLocation="http://www.foo.com/test
test-att.xsd">
  <testElement/>
</testRoot>


-- 
Andrew Newton
anewton@research.netsol.com

Mime
View raw message