Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
CSS
[WARNING] src-resolve.4.2: Error resolving component 'xs:schema'. It was detecte
d that 'xs:schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but compo
nents from this namespace are not referenceable from schema document 'http://loc
alhost/BankService/AccountService.svc?xsd=xsd0'. If this is the incorrect namesp
ace, perhaps the prefix of 'xs:schema' needs to be changed. If this is the corre
ct namespace, then an appropriate 'import' tag should be added to 'http://localh
ost/BankService/AccountService.svc?xsd=xsd0'.
  line 1 of http://localhost/BankService/AccountService.svc?xsd=xsd0
Posted
Comments
walterhevedeich 13-Apr-11 8:48am    
Not clear. describe your scenario. and if necessary, post some code.
Sandeep Mewara 13-Apr-11 8:51am    
Can you elaborate what were you trying and how you got it, etc?

1 solution

XML Schema depends on namespaces. Document.createElement() and Element.setAttribute() create non-namespace-aware element and attribute nodes which are missing a local name and namespace URI. You should never use the DOM Level 1 non-namespace factory methods with a DOM containing namespace-aware nodes (or with APIs expecting namespace-aware nodes). New element/attribute nodes should be created by calling
Document.createElementNS() [1] and Element.setAttributeNS() [2].
e.g.
Change:
    document.createElement("s:import")
To:
    document.createElementNS("http://www.w3.org/2001/XMLSchema", "s:import")


[1] http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-DocCrElNS
[2] http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-ElSetAttrNS


[that is from the FIRST answer on google!]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900