You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Susanna Sj?holm (JIRA)" <xm...@xml.apache.org> on 2004/12/21 11:36:15 UTC

[jira] Created: (XMLBEANS-96) XmlDocumentProperties missing version and encoding

XmlDocumentProperties missing version and encoding
--------------------------------------------------

         Key: XMLBEANS-96
         URL: http://nagoya.apache.org/jira/browse/XMLBEANS-96
     Project: XMLBeans
        Type: Bug
    Versions: Version 1.0.3    
 Environment: Windows 2000, jdk 1.4.2_05
    Reporter: Susanna Sjöholm


The version and encoding properties are null in XmlDocumentProperties object after parsing a document, although the document begins with an xml declaration including version and encoding. 

Example
--------
String xml = ... //string that begins with <?xml version="1.0" encoding="UTF-8" ?>
SomeDocument doc = SomeDocument.Factory.parse(xml); 
XmlDocumentProperties props = doc.documentProperties();
String version = props.getVersion();  //=> should be "1.0" but is null!
String encoding = props.getEncoding(); //=> should be "UTF-8" but is null!

Parsing is ok otherwise and the document can be successfully validated. Only tested on 1.0.3.

Is there a workaround? I.e. can version and encoding be retrieved from the XmlObject in another way? (I have not managed to retrieve it by using a cursor.)

Also, I think it is an error that the xml declaration is not included when getting the xml as a string(e.g. using xmlText()) from a document. I would want the same result out as I had before parsing. Related to closed issue XMLBEANS-10.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Closed: (XMLBEANS-96) XmlDocumentProperties missing version and encoding

Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-96?page=history ]
     
Jacob Danner closed XMLBEANS-96:
--------------------------------


Unit Test Passes in V2, closing

> XmlDocumentProperties missing version and encoding
> --------------------------------------------------
>
>          Key: XMLBEANS-96
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-96
>      Project: XMLBeans
>         Type: Bug
>     Versions: Version 1.0.3
>  Environment: Windows 2000, jdk 1.4.2_05
>     Reporter: Susanna Sjöholm
>     Assignee: Jacob Danner
>      Fix For: Version 2, Version 2 Beta 1, Version 2 Beta 2

>
> The version and encoding properties are null in XmlDocumentProperties object after parsing a document, although the document begins with an xml declaration including version and encoding. 
> Example
> --------
> String xml = ... //string that begins with <?xml version="1.0" encoding="UTF-8" ?>
> SomeDocument doc = SomeDocument.Factory.parse(xml); 
> XmlDocumentProperties props = doc.documentProperties();
> String version = props.getVersion();  //=> should be "1.0" but is null!
> String encoding = props.getEncoding(); //=> should be "UTF-8" but is null!
> Parsing is ok otherwise and the document can be successfully validated. Only tested on 1.0.3.
> Is there a workaround? I.e. can version and encoding be retrieved from the XmlObject in another way? (I have not managed to retrieve it by using a cursor.)
> Also, I think it is an error that the xml declaration is not included when getting the xml as a string(e.g. using xmlText()) from a document. I would want the same result out as I had before parsing. Related to closed issue XMLBEANS-10.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Resolved: (XMLBEANS-96) XmlDocumentProperties missing version and encoding

Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-96?page=history ]
     
Jacob Danner resolved XMLBEANS-96:
----------------------------------

     Resolution: Fixed
    Fix Version: Version 2 Beta 1
                 Version 2 Beta 2
                 Version 2

This is fixed in V2. The case has been automated for regession. 
misc.detailed.JiraRegression50_100Test.test_jira_xmlbeans96

> XmlDocumentProperties missing version and encoding
> --------------------------------------------------
>
>          Key: XMLBEANS-96
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-96
>      Project: XMLBeans
>         Type: Bug
>     Versions: Version 1.0.3
>  Environment: Windows 2000, jdk 1.4.2_05
>     Reporter: Susanna Sjöholm
>     Assignee: Jacob Danner
>      Fix For: Version 2, Version 2 Beta 1, Version 2 Beta 2

>
> The version and encoding properties are null in XmlDocumentProperties object after parsing a document, although the document begins with an xml declaration including version and encoding. 
> Example
> --------
> String xml = ... //string that begins with <?xml version="1.0" encoding="UTF-8" ?>
> SomeDocument doc = SomeDocument.Factory.parse(xml); 
> XmlDocumentProperties props = doc.documentProperties();
> String version = props.getVersion();  //=> should be "1.0" but is null!
> String encoding = props.getEncoding(); //=> should be "UTF-8" but is null!
> Parsing is ok otherwise and the document can be successfully validated. Only tested on 1.0.3.
> Is there a workaround? I.e. can version and encoding be retrieved from the XmlObject in another way? (I have not managed to retrieve it by using a cursor.)
> Also, I think it is an error that the xml declaration is not included when getting the xml as a string(e.g. using xmlText()) from a document. I would want the same result out as I had before parsing. Related to closed issue XMLBEANS-10.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org