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 "Agrawal, Vikas (ELS)" <V....@elsevier.co.uk> on 2003/09/19 16:33:12 UTC

Is it a bug with namespace

Hi All,

I am using xml4c 2.2.0 and DOMBuilder to parse my xml files.

I get error "The prefix 'sb' has not been mapped to any URI" for attached
file 'vikas.xml' as soon as I set name space to true as show below.
parserInstance_->setFeature(XMLUni::fgDOMNamespaces, true);

Could anybody help me what is wrong? I am attaching dtd used in this xml
file as well.

Thanks & Regards
Vikas Agrawal

 <<vikas.xml>>  <<vikas.ent>>  <<vikas.dtd>> 

Re: Is it a bug with namespace

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
	you don't seem to have mapped the prefix to an xmlns:prefix 
declararion. Take a look at thenamespaces spec or a tutorial.

Gareth



On Fri, 19 Sep 2003, Agrawal, Vikas (ELS) wrote:

> Hi All,
> 
> I am using xml4c 2.2.0 and DOMBuilder to parse my xml files.
> 
> I get error "The prefix 'sb' has not been mapped to any URI" for attached
> file 'vikas.xml' as soon as I set name space to true as show below.
> parserInstance_->setFeature(XMLUni::fgDOMNamespaces, true);
> 
> Could anybody help me what is wrong? I am attaching dtd used in this xml
> file as well.
> 
> Thanks & Regards
> Vikas Agrawal
> 
>  <<vikas.xml>>  <<vikas.ent>>  <<vikas.dtd>> 
> 

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




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


Re: Is it a bug with namespace

Posted by Gareth Reakes <ga...@decisionsoft.com>.
you have declared it on an element in the dtd but that element 
(sb:reference) is not in the xml document you have provided.
If you changed sb:pages definition to this:

<!ELEMENT sb:pages (sb:first-page, sb:last-page?)>                                                        
<!ATTLIST sb:pages                                                                                          
xmlns:sb CDATA #FIXED "http://www.elsevier.com/xml/sb">  


then all would be fine. 

Gareth


-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




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