You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Ricky Nguyen (Created) (JIRA)" <ji...@apache.org> on 2012/02/28 09:57:49 UTC

[jira] [Created] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

SerializableMetadata.toXml() doesn't set namespace on root element
------------------------------------------------------------------

                 Key: OODT-395
                 URL: https://issues.apache.org/jira/browse/OODT-395
             Project: OODT
          Issue Type: Bug
          Components: metadata container
    Affects Versions: 0.4
            Reporter: Ricky Nguyen
             Fix For: 0.4


This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):

{code}
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
{code}

Then the root element is NOT part of the "cas" namespace:
{code}
<metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</metadata>
{code}

Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
{code}
<cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</cas:metadata>
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Paul Ramirez (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218588#comment-13218588 ] 

Paul Ramirez commented on OODT-395:
-----------------------------------

Fixed typo in my example from cas to xmlns. Didn't see an email generated so making sure this notifies people of the change.
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Brian Foster (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218925#comment-13218925 ] 

Brian Foster commented on OODT-395:
-----------------------------------

Just read that this has already been discussed... changing the metadata element to use cas namespace is already going to break existing xslt, so I'm not sure it is so bad adding all the elements to the cas namespace
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Chris A. Mattmann (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219325#comment-13219325 ] 

Chris A. Mattmann edited comment on OODT-395 at 2/29/12 4:25 PM:
-----------------------------------------------------------------

Hey guys, yeah I think there are two issues here. 

First, the issue of Ricky's small patch to simply make SerializableMetadata generate metadata files that simply match the way we normally generate them elsewhere in the system. +1 to that, small, incremental patch, where Ricky has done the work and it doesn't hurt anything and makes us more consistent. I also think it's good because it's a small incremental, and reversible change.

Second, Paul has raised a good XML schema/XSD practice in general that we might want to look at following, that has broader implications across the rest of the components and ecosystem. Let's not get hung up discussing that here. If Paul or Brian or myself or anyone else want to go down that road, we can do so, in a separate thread. My guess is that we won't have the time or it'll get hung up somewhere, and if so, great, if not, great too. But we shouldn't let it hang up this change IMHO, since it's a small, good, incremental step.



                
      was (Author: chrismattmann):
    Hey guys, yeah I think there are too issues here. 

First, the issue of Ricky's small patch to simply make SerializableMetadata generate metadata files that simply match the way we normally generate them elsewhere in the system. +1 to that, small, incremental patch, where Ricky has done the work and it doesn't hurt anything and makes us more consistent. I also think it's good because it's a small incremental, and reversible change.

Second, Paul has raised a good XML schema/XSD practice in general that we might want to look at following, that has broader implications across the rest of the components and ecosystem. Let's not get hung up discussing that here. If Paul or Brian or myself or anyone else want to go down that road, we can do so, in a separate thread. My guess is that we won't have the time or it'll get hung up somewhere, and if so, great, if not, great too. But we shouldn't let it hang up this change IMHO, since it's a small, good, incremental step.



                  
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Ricky Nguyen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218793#comment-13218793 ] 

Ricky Nguyen commented on OODT-395:
-----------------------------------

Let me clarify the issue.

# Currently, SerializableMetadata#toXML returns a DOM document object with the following:
## root element has localname "cas:metadata" and NULL namespace
## keyval has NULL namespace
## key has NULL namespace
## val has NULL namespace
# Parsing a DOM document from serialized metadata returns a DOM document object with the following:
## root element has localname "metadata", "http://oodt.jpl.nasa.gov/1.0/cas" namespace, and "cas" prefix
## keyval has NULL namespace
## key has NULL namespace
## val has NULL namespace

I am changing 1.1 to be equivalent to 2.1.

To consider backwards compatibility, suppose we read in a metadata file serialized before this bug fix.
{code:title=old-met.xml}
<cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
<keyval type="vector">
<key>Name</key>
<val>Value</val>
</keyval>
</cas:metadata>
{code}

My fix does not change the output, so backwards compatibility is preserved.

If we set the default namespace as Paul suggested, the output changes:
{code:title=new-met.xml}
<metadata xmlns="http://oodt.jpl.nasa.gov/1.0/cas">
<keyval type="vector">
<key>Name</key>
<val>Value</val>
</keyval>
</metadata>
{code}

Here, ALL elements belong to the cas namespace.  DOM parsed from new file != DOM parsed from old file.  This could be a major issue, I don't know.  People with existing XSLT (in PgeConfig <dynInputFiles>) will have to change their templates.

If we really want ALL elements to belong to the cas namespace, we need to be smarter about parsing old files (see http://www.xfront.com/HideVersusExpose.html about hiding the "cas:" qualifier).  Also, we would need to change cas.metadata.xsd to reflect these changes.  Let me know if this is the road we want to take, otherwise I'm inclined to stick with the simplest fix.
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220998#comment-13220998 ] 

jiraposter@reviews.apache.org commented on OODT-395:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4088/#review5558
-----------------------------------------------------------

Ship it!


good job

- Paul


On 2012-02-29 20:02:06, Ricky Nguyen wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4088/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-02-29 20:02:06)
bq.  
bq.  
bq.  Review request for oodt.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Create metadata root element with a proper namespace and prefix.
bq.  
bq.  
bq.  This addresses bug OODT-395.
bq.      https://issues.apache.org/jira/browse/OODT-395
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/SerializableMetadata.java 1293402 
bq.    trunk/metadata/src/test/org/apache/oodt/cas/metadata/TestSerializableMetadata.java 1293402 
bq.  
bq.  Diff: https://reviews.apache.org/r/4088/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added unit test in TestSerializableMetadata#testNamespace() to demonstrate bug and fix.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ricky
bq.  
bq.


                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Paul Ramirez (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218872#comment-13218872 ] 

Paul Ramirez commented on OODT-395:
-----------------------------------

You should also be careful about that site while some of the assertions are valid some of it is bogus. The author actually made the document look busier than need be by not utilizing a default namespace. Generally xfont is a good resource but you have to take some things with a grain of salt. 

Many people use namespaces pervasively to make it easier to fold in functionality that can be ignored by earlier versions of parser. But since we didn't make that decision up front and have no use case for mixing in namespaces here the decision is easy. Go for the backwards compatible version.
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Paul Ramirez (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218580#comment-13218580 ] 

Paul Ramirez commented on OODT-395:
-----------------------------------

I would set the default namespace instead. Functionally, they should be the same.
{code}
<metadata cas="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</metadata>
{code}
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Brian Foster (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218923#comment-13218923 ] 

Brian Foster commented on OODT-395:
-----------------------------------

This is a good catch... Have we tested that keyval and other elements inside metadata element are ending up in the cas namespace... might need to also set cas as the default namespace
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Paul Ramirez (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218580#comment-13218580 ] 

Paul Ramirez edited comment on OODT-395 at 2/28/12 8:26 PM:
------------------------------------------------------------

I would set the default namespace instead. Functionally, they should be the same.
{code}
<metadata cas="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</metadata>
{code}

Then nothing within that metadata tag needs to be qualified either.
                
      was (Author: pramirez):
    I would set the default namespace instead. Functionally, they should be the same.
{code}
<metadata cas="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</metadata>
{code}
                  
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Chris A. Mattmann (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218877#comment-13218877 ] 

Chris A. Mattmann commented on OODT-395:
----------------------------------------

+1, I agree with [~rickdn] here, KISS principle applies. Looks like [~pramirez] agrees too, so let's just KISS here and go with Ricky's patch.
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219475#comment-13219475 ] 

jiraposter@reviews.apache.org commented on OODT-395:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4088/
-----------------------------------------------------------

(Updated 2012-02-29 20:02:06.646815)


Review request for oodt.


Changes
-------

test checks namespace value and prefix value


Summary
-------

Create metadata root element with a proper namespace and prefix.


This addresses bug OODT-395.
    https://issues.apache.org/jira/browse/OODT-395


Diffs (updated)
-----

  trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/SerializableMetadata.java 1293402 
  trunk/metadata/src/test/org/apache/oodt/cas/metadata/TestSerializableMetadata.java 1293402 

Diff: https://reviews.apache.org/r/4088/diff


Testing
-------

Added unit test in TestSerializableMetadata#testNamespace() to demonstrate bug and fix.


Thanks,

Ricky


                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218537#comment-13218537 ] 

jiraposter@reviews.apache.org commented on OODT-395:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4088/
-----------------------------------------------------------

Review request for oodt.


Summary
-------

Create metadata root element with a proper namespace and prefix.


This addresses bug OODT-395.
    https://issues.apache.org/jira/browse/OODT-395


Diffs
-----

  trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/SerializableMetadata.java 1293402 
  trunk/metadata/src/test/org/apache/oodt/cas/metadata/TestSerializableMetadata.java 1293402 

Diff: https://reviews.apache.org/r/4088/diff


Testing
-------

Added unit test in TestSerializableMetadata#testNamespace() to demonstrate bug and fix.


Thanks,

Ricky


                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Chris A. Mattmann (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219325#comment-13219325 ] 

Chris A. Mattmann commented on OODT-395:
----------------------------------------

Hey guys, yeah I think there are too issues here. 

First, the issue of Ricky's small patch to simply make SerializableMetadata generate metadata files that simply match the way we normally generate them elsewhere in the system. +1 to that, small, incremental patch, where Ricky has done the work and it doesn't hurt anything and makes us more consistent. I also think it's good because it's a small incremental, and reversible change.

Second, Paul has raised a good XML schema/XSD practice in general that we might want to look at following, that has broader implications across the rest of the components and ecosystem. Let's not get hung up discussing that here. If Paul or Brian or myself or anyone else want to go down that road, we can do so, in a separate thread. My guess is that we won't have the time or it'll get hung up somewhere, and if so, great, if not, great too. But we shouldn't let it hang up this change IMHO, since it's a small, good, incremental step.



                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Paul Ramirez (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218864#comment-13218864 ] 

Paul Ramirez commented on OODT-395:
-----------------------------------

Stick with the simplest. It would have been nice to have all the elements in the same namespace but given that is not backwards compatible its not worth the headache. I don't know how many XSLT have been written but since we wouldn't likely mix in other namespaces here this is a non starter anyhow. Proceed with your original plan.
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Ricky Nguyen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricky Nguyen updated OODT-395:
------------------------------

    Attachment: rickdn.oodt-395.patch
    
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220686#comment-13220686 ] 

jiraposter@reviews.apache.org commented on OODT-395:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4088/#review5545
-----------------------------------------------------------

Ship it!


LGTM, Ricky!

- Chris


On 2012-02-29 20:02:06, Ricky Nguyen wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4088/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-02-29 20:02:06)
bq.  
bq.  
bq.  Review request for oodt.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Create metadata root element with a proper namespace and prefix.
bq.  
bq.  
bq.  This addresses bug OODT-395.
bq.      https://issues.apache.org/jira/browse/OODT-395
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/SerializableMetadata.java 1293402 
bq.    trunk/metadata/src/test/org/apache/oodt/cas/metadata/TestSerializableMetadata.java 1293402 
bq.  
bq.  Diff: https://reviews.apache.org/r/4088/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added unit test in TestSerializableMetadata#testNamespace() to demonstrate bug and fix.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ricky
bq.  
bq.


                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218922#comment-13218922 ] 

jiraposter@reviews.apache.org commented on OODT-395:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4088/#review5436
-----------------------------------------------------------



trunk/metadata/src/test/org/apache/oodt/cas/metadata/TestSerializableMetadata.java
<https://reviews.apache.org/r/4088/#comment11840>

    should check that namespace is cas namespace here


- brian


On 2012-02-28 19:47:16, Ricky Nguyen wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4088/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-02-28 19:47:16)
bq.  
bq.  
bq.  Review request for oodt.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Create metadata root element with a proper namespace and prefix.
bq.  
bq.  
bq.  This addresses bug OODT-395.
bq.      https://issues.apache.org/jira/browse/OODT-395
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/SerializableMetadata.java 1293402 
bq.    trunk/metadata/src/test/org/apache/oodt/cas/metadata/TestSerializableMetadata.java 1293402 
bq.  
bq.  Diff: https://reviews.apache.org/r/4088/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added unit test in TestSerializableMetadata#testNamespace() to demonstrate bug and fix.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ricky
bq.  
bq.


                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Ricky Nguyen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricky Nguyen resolved OODT-395.
-------------------------------

    Resolution: Fixed

simple fix committed.  schema change deferred to another discussion/issue.
                
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (OODT-395) SerializableMetadata.toXml() doesn't set namespace on root element

Posted by "Paul Ramirez (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218580#comment-13218580 ] 

Paul Ramirez edited comment on OODT-395 at 2/28/12 8:27 PM:
------------------------------------------------------------

I would set the default namespace instead. Functionally, they should be the same.
{code}
<metadata xmlns="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</metadata>
{code}

Then nothing within that metadata tag needs to be qualified either.
                
      was (Author: pramirez):
    I would set the default namespace instead. Functionally, they should be the same.
{code}
<metadata cas="http://oodt.jpl.nasa.gov/1.0/cas">
  ...
</metadata>
{code}

Then nothing within that metadata tag needs to be qualified either.
                  
> SerializableMetadata.toXml() doesn't set namespace on root element
> ------------------------------------------------------------------
>
>                 Key: OODT-395
>                 URL: https://issues.apache.org/jira/browse/OODT-395
>             Project: OODT
>          Issue Type: Bug
>          Components: metadata container
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>             Fix For: 0.4
>
>         Attachments: rickdn.oodt-395.patch
>
>
> This issue becomes apparent when using o.a.o.cas.pge.writers.xslt.XslTransformWriter in the <dynInputFile> element of a PGE config xml.  If you use the identity xsl transform (http://en.wikipedia.org/wiki/Identity_transform#Using_XSLT):
> {code}
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> {code}
> Then the root element is NOT part of the "cas" namespace:
> {code}
> <metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </metadata>
> {code}
> Whereas the serialized form of metadata (when written to a File or OutputStream) DOES use the "cas" namespace:
> {code}
> <cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
>   ...
> </cas:metadata>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira