DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26481>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26481

sax.Writer does not emit namespace declarations for PSVI dump

           Summary: sax.Writer does not emit namespace declarations for PSVI
                    dump
           Product: Xerces2-J
           Version: 2.6.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When called with the command line

   java -cp ... sax.Writer -v -s -f -p xni.parser.PSVIParser test.xml 

on a test file (details of the test file don't matter),
XercesJ produces an XML representation of the PSVI.  This
is a very useful representation of the PSVI and I'm grateful
for it.  But it reads in part (I omit nothing salient):

<document>
 <children>
  <element>
   ...
   <attributes>
    <attribute>
     <namespaceName>http://www.w3.org/2001/XMLSchema-instance</namespaceName>
     <localName>schemaLocation</localName>
     ...
     <references xsi:nil="true"></references>
     <psv:validationAttempted>full</psv:validationAttempted>
     ...
    </attribute>
   </attributes>
   ...

I.e. it uses the namespace prefixes xsi and psv (to denote the 
XML Schema instance namespace and the namespace for the PSVI 
reflection in 'alternating normal form' defined by Henry Thompson 
and Richard Tobin), and the default namespace is that associated
with the XML Infoset.  All without any namespace declarations.

I get results which match my expectations if I insert the
following three namespace declarations on the 'document'
element start-tag:

  xmlns='http://www.w3.org/2001/05/XMLInfoset' 
  xmlns:psv='http://www.w3.org/2001/05/PSVInfosetExtension' 
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'

Is there a reason that sax.Writer cannot or does not emit
these?

Thanks.

-C. M. Sperberg-McQueen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to