You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Bill Yan (JIRA)" <xe...@xml.apache.org> on 2007/07/09 11:18:04 UTC

[jira] Created: (XERCESC-1720) namespace defined in a element doesn't work correctly

namespace defined in a element doesn't work correctly
-----------------------------------------------------

                 Key: XERCESC-1720
                 URL: https://issues.apache.org/jira/browse/XERCESC-1720
             Project: Xerces-C++
          Issue Type: Bug
          Components: Validating Parser (Schema) (Xerces 1.5 or up only)
    Affects Versions: 2.7.0
         Environment: Windows XP 
            Reporter: Bill Yan


Defining a namespace in the following element('RootElem')like this: 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="MyNamespace" targetNamespace="MyNamespace" elementFormDefault="qualified">  
    <xs:complexType name="TestTypeB">
        <xs:sequence>
            <xs:element name="TypeBtElem" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>  
    <xs:element name="RootElem" type="myns:TestTypeB" xmlns:myns="MyNamespace"/>
</xs:schema>

I think the schema file above should be valid(I tried to use XMLSpy to check, it's ok), but when I use XercesDOMParser::loadGrammar() to check the validity of this schema file, the following error info is reported: 
"Prefix: 'myns' can not be resolved to a URI - Line 8, Col 81" 


-- 
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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Closed: (XERCESC-1720) namespace defined in a element doesn't work correctly

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari closed XERCESC-1720.
------------------------------------

    Resolution: Duplicate

Duplicate of XERCESC-1592

> namespace defined in a element doesn't work correctly
> -----------------------------------------------------
>
>                 Key: XERCESC-1720
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1720
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>    Affects Versions: 2.7.0
>         Environment: Windows XP 
>            Reporter: Bill Yan
>
> Defining a namespace in the following element('RootElem')like this: 
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="MyNamespace" targetNamespace="MyNamespace" elementFormDefault="qualified">  
>     <xs:complexType name="TestTypeB">
>         <xs:sequence>
>             <xs:element name="TypeBtElem" type="xs:string"/>
>         </xs:sequence>
>     </xs:complexType>  
>     <xs:element name="RootElem" type="myns:TestTypeB" xmlns:myns="MyNamespace"/>
> </xs:schema>
> I think the schema file above should be valid(I tried to use XMLSpy to check, it's ok), but when I use XercesDOMParser::loadGrammar() to check the validity of this schema file, the following error info is reported: 
> "Prefix: 'myns' can not be resolved to a URI - Line 8, Col 81" 

-- 
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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org