You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Eitan Plotnik (JIRA)" <ji...@apache.org> on 2008/06/26 10:38:45 UTC

[jira] Created: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Issue in XmlUtils.setNamespaceAttribute() method
------------------------------------------------

                 Key: MUSE-290
                 URL: https://issues.apache.org/jira/browse/MUSE-290
             Project: Muse
          Issue Type: Bug
          Components: Utilities - General, QName, and XML
    Affects Versions: 2.2.0
         Environment: any
            Reporter: Eitan Plotnik
            Assignee: Dan Jemiolo
            Priority: Minor


The method appends a colon and prefix values to the namespace if the specified prefix isn't null.
It should do the same if the specified prefix is an empty string.
E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null && !"".equals(prefix))"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


RE: [jira] Created: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Posted by Eitan Plotnik <ep...@cisco.com>.

Hi Vinh,

The current situation _is_ that a colon is appended to the namespace even if
the prefix is an empty string, resulting in an invalid namespace (e.g.
"xmlns:") which can't be read by parsers.
I suggested to fix the condition to test for empty strings in addition to
null prefixes.

Eitan.





Vinh Nguyen (vinguye2) wrote:
> 
> Hi Eitan,
> 
> The prefix cannot be null, so an empty string is used to indicate "no
> prefix".  It doesn't make sense to prepend a colon to the namespace if
> there is no prefix.
> 
> Otherwise, schema parsers may throw errors that a colon is found but no
> prefix is set, because they don't know the intent of why the colon was
> specified (i.e. is the prefix missing, or should it be empty string?).
> 
> -Vinh
> 
> 
> -----Original Message-----
> From: Eitan Plotnik (JIRA) [mailto:jira@apache.org] 
> Sent: Thursday, June 26, 2008 1:39 AM
> To: muse-dev@ws.apache.org
> Subject: [jira] Created: (MUSE-290) Issue in
> XmlUtils.setNamespaceAttribute() method
> 
> Issue in XmlUtils.setNamespaceAttribute() method
> ------------------------------------------------
> 
>                  Key: MUSE-290
>                  URL: https://issues.apache.org/jira/browse/MUSE-290
>              Project: Muse
>           Issue Type: Bug
>           Components: Utilities - General, QName, and XML
>     Affects Versions: 2.2.0
>          Environment: any
>             Reporter: Eitan Plotnik
>             Assignee: Dan Jemiolo
>             Priority: Minor
> 
> 
> The method appends a colon and prefix values to the namespace if the
> specified prefix isn't null.
> It should do the same if the specified prefix is an empty string.
> E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null
> && !"".equals(prefix))"
> 
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28MUSE-290%29-Issue-in-XmlUtils.setNamespaceAttribute%28%29-method-tp18129230p18380798.html
Sent from the Muse - Dev mailing list archive at Nabble.com.


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


[jira] Assigned: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Posted by "Chris Twiner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MUSE-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Twiner reassigned MUSE-290:
---------------------------------

    Assignee: Chris Twiner  (was: Dan Jemiolo)

> Issue in XmlUtils.setNamespaceAttribute() method
> ------------------------------------------------
>
>                 Key: MUSE-290
>                 URL: https://issues.apache.org/jira/browse/MUSE-290
>             Project: Muse
>          Issue Type: Bug
>          Components: Utilities - General, QName, and XML
>    Affects Versions: 2.2.0
>         Environment: any
>            Reporter: Eitan Plotnik
>            Assignee: Chris Twiner
>            Priority: Minor
>
> The method appends a colon and prefix values to the namespace if the specified prefix isn't null.
> It should do the same if the specified prefix is an empty string.
> E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null && !"".equals(prefix))"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


RE: [jira] Created: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Posted by Daniel Jemiolo <da...@us.ibm.com>.
This link provides some insight into the trickery of default/empty/null
namespaces:

http://ws.apache.org/muse/docs/2.1.0/manual/troubleshooting/default-namespaces-xerces.html

Dan



"Vinh Nguyen (vinguye2)" <vi...@cisco.com> wrote on 06/26/2008 01:29:20
PM:

> Hi Eitan,
>
> The prefix cannot be null, so an empty string is used to indicate "no
> prefix".  It doesn't make sense to prepend a colon to the namespace if
> there is no prefix.
>
> Otherwise, schema parsers may throw errors that a colon is found but no
> prefix is set, because they don't know the intent of why the colon was
> specified (i.e. is the prefix missing, or should it be empty string?).
>
> -Vinh
>
>
> -----Original Message-----
> From: Eitan Plotnik (JIRA) [mailto:jira@apache.org]
> Sent: Thursday, June 26, 2008 1:39 AM
> To: muse-dev@ws.apache.org
> Subject: [jira] Created: (MUSE-290) Issue in
> XmlUtils.setNamespaceAttribute() method
>
> Issue in XmlUtils.setNamespaceAttribute() method
> ------------------------------------------------
>
>                  Key: MUSE-290
>                  URL: https://issues.apache.org/jira/browse/MUSE-290
>              Project: Muse
>           Issue Type: Bug
>           Components: Utilities - General, QName, and XML
>     Affects Versions: 2.2.0
>          Environment: any
>             Reporter: Eitan Plotnik
>             Assignee: Dan Jemiolo
>             Priority: Minor
>
>
> The method appends a colon and prefix values to the namespace if the
> specified prefix isn't null.
> It should do the same if the specified prefix is an empty string.
> E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null
> && !"".equals(prefix))"
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
>

RE: [jira] Created: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Hi Eitan,

The prefix cannot be null, so an empty string is used to indicate "no
prefix".  It doesn't make sense to prepend a colon to the namespace if
there is no prefix.

Otherwise, schema parsers may throw errors that a colon is found but no
prefix is set, because they don't know the intent of why the colon was
specified (i.e. is the prefix missing, or should it be empty string?).

-Vinh


-----Original Message-----
From: Eitan Plotnik (JIRA) [mailto:jira@apache.org] 
Sent: Thursday, June 26, 2008 1:39 AM
To: muse-dev@ws.apache.org
Subject: [jira] Created: (MUSE-290) Issue in
XmlUtils.setNamespaceAttribute() method

Issue in XmlUtils.setNamespaceAttribute() method
------------------------------------------------

                 Key: MUSE-290
                 URL: https://issues.apache.org/jira/browse/MUSE-290
             Project: Muse
          Issue Type: Bug
          Components: Utilities - General, QName, and XML
    Affects Versions: 2.2.0
         Environment: any
            Reporter: Eitan Plotnik
            Assignee: Dan Jemiolo
            Priority: Minor


The method appends a colon and prefix values to the namespace if the
specified prefix isn't null.
It should do the same if the specified prefix is an empty string.
E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null
&& !"".equals(prefix))"

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


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


[jira] Resolved: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Posted by "Chris Twiner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MUSE-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Twiner resolved MUSE-290.
-------------------------------

    Resolution: Duplicate

Duplicate of https://issues.apache.org/jira/browse/MUSE-290

> Issue in XmlUtils.setNamespaceAttribute() method
> ------------------------------------------------
>
>                 Key: MUSE-290
>                 URL: https://issues.apache.org/jira/browse/MUSE-290
>             Project: Muse
>          Issue Type: Bug
>          Components: Utilities - General, QName, and XML
>    Affects Versions: 2.2.0
>         Environment: any
>            Reporter: Eitan Plotnik
>            Assignee: Chris Twiner
>            Priority: Minor
>             Fix For: 2.2.1
>
>
> The method appends a colon and prefix values to the namespace if the specified prefix isn't null.
> It should do the same if the specified prefix is an empty string.
> E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null && !"".equals(prefix))"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (MUSE-290) Issue in XmlUtils.setNamespaceAttribute() method

Posted by "Chris Twiner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656613#action_12656613 ] 

Chris Twiner commented on MUSE-290:
-----------------------------------

same thing for Francesco Scandelli's problem in issue 149.

> Issue in XmlUtils.setNamespaceAttribute() method
> ------------------------------------------------
>
>                 Key: MUSE-290
>                 URL: https://issues.apache.org/jira/browse/MUSE-290
>             Project: Muse
>          Issue Type: Bug
>          Components: Utilities - General, QName, and XML
>    Affects Versions: 2.2.0
>         Environment: any
>            Reporter: Eitan Plotnik
>            Assignee: Dan Jemiolo
>            Priority: Minor
>
> The method appends a colon and prefix values to the namespace if the specified prefix isn't null.
> It should do the same if the specified prefix is an empty string.
> E.g. modify line 1854 from "if (prefix != null)" to "if (prefix != null && !"".equals(prefix))"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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