Schema file name is not detecting the namespace












0















I'm having the lot of XSD, which is included with single XSD file and all the files are getting valid well and the corresponding XML file also getting valid against corresponding XSD using oxygen XML editor. But while uploading the xml file against the XSD's file in the product. I'm getting the below error:




Error resolving component 'Definition.attrib'. It was detected that
'Definition.attrib' has no namespace, but components with no target
namespace are not referenceable from schema document




When I opened the corresponding file, it shows validated in oxygen XML editor. Here is the code for the corresponding file:



<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>

<xs:include schemaLocation="common-attrib.xsd"></xs:include>
<xs:include schemaLocation="../common/common-attribs.xsd"></xs:include>

<xs:attributeGroup name="mean.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>


<xs:complexType name="mean.type">
<xs:attributeGroup ref="mean.attlist"/>
</xs:complexType>

<xs:element name="mean" type="mean.type"/>

<xs:attributeGroup name="sdev.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="sdev.type">
<xs:attributeGroup ref="sdev.attlist"/>
</xs:complexType>

<xs:element name="sdev" type="sdev.type"/>

<!-- "variance" -->

<xs:attributeGroup name="variance.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="variance.type">
<xs:attributeGroup ref="variance.attlist"/>
</xs:complexType>

<xs:element name="variance" type="variance.type"/>

<!-- "median" -->

<xs:attributeGroup name="median.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="median.type">
<xs:attributeGroup ref="median.attlist"/>
</xs:complexType>

<xs:element name="median" type="median.type"/>

<!-- "mode" -->

<xs:attributeGroup name="mode.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="mode.type">
<xs:attributeGroup ref="mode.attlist"/>
</xs:complexType>

<xs:element name="mode" type="mode.type"/>

<!-- "moment" -->

<xs:attributeGroup name="moment.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="moment.type">
<xs:attributeGroup ref="moment.attlist"/>
</xs:complexType>

<xs:element name="moment" type="moment.type"/>

<!-- "momentabout" -->

<xs:attributeGroup name="momentabout.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:group name="momentabout.content">
<xs:sequence>
<xs:group ref="Content-statistics.class"/>
</xs:sequence>
</xs:group>

<xs:complexType name="momentabout.type">
<xs:group ref="momentabout.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="momentabout.attlist"/>
</xs:complexType>

<xs:element name="momentabout" type="momentabout.type"/>

<!-- And the group of everything -->

<xs:group name="Content-statistics.class">
<xs:choice>
<xs:element ref="mean"/>
<xs:element ref="sdev"/>
<xs:element ref="variance"/>
<xs:element ref="median"/>
<xs:element ref="mode"/>
<xs:element ref="moment"/>
<xs:element ref="momentabout"/>
</xs:choice>
</xs:group>


</xs:schema>


corresponding xml file is here:



<?xml version="1.0" encoding="UTF-8"?>
<document xmlns:CORE="http://www.reallysi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xsi:noNamespaceSchemaLocation="oup.xsd">
<documentinfo publisher="OUPAustralia" title="Test Title - HE" titlenumber="1" isbn13="9780190311360" edition="4" author="Reynolds"/>
<chapter no="2">
<title><num>2</num><head>Inquiry Pedagogy</head></title>
<intro>
<para fo="Y"><txt><b>Good pedagogy</b></txt></para>
<para><txt><b>Research</b></txt></para>
</intro>
</document>


Can anybody help me on this, why this error is occuring. Please provide me suggestion for this.










share|improve this question

























  • Please also post the XML you are trying to validate. Thank you.

    – potame
    Nov 14 '18 at 8:44











  • Hi @potame. I have edited in my question. Please see

    – Scott Don
    Nov 14 '18 at 10:19
















0















I'm having the lot of XSD, which is included with single XSD file and all the files are getting valid well and the corresponding XML file also getting valid against corresponding XSD using oxygen XML editor. But while uploading the xml file against the XSD's file in the product. I'm getting the below error:




Error resolving component 'Definition.attrib'. It was detected that
'Definition.attrib' has no namespace, but components with no target
namespace are not referenceable from schema document




When I opened the corresponding file, it shows validated in oxygen XML editor. Here is the code for the corresponding file:



<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>

<xs:include schemaLocation="common-attrib.xsd"></xs:include>
<xs:include schemaLocation="../common/common-attribs.xsd"></xs:include>

<xs:attributeGroup name="mean.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>


<xs:complexType name="mean.type">
<xs:attributeGroup ref="mean.attlist"/>
</xs:complexType>

<xs:element name="mean" type="mean.type"/>

<xs:attributeGroup name="sdev.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="sdev.type">
<xs:attributeGroup ref="sdev.attlist"/>
</xs:complexType>

<xs:element name="sdev" type="sdev.type"/>

<!-- "variance" -->

<xs:attributeGroup name="variance.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="variance.type">
<xs:attributeGroup ref="variance.attlist"/>
</xs:complexType>

<xs:element name="variance" type="variance.type"/>

<!-- "median" -->

<xs:attributeGroup name="median.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="median.type">
<xs:attributeGroup ref="median.attlist"/>
</xs:complexType>

<xs:element name="median" type="median.type"/>

<!-- "mode" -->

<xs:attributeGroup name="mode.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="mode.type">
<xs:attributeGroup ref="mode.attlist"/>
</xs:complexType>

<xs:element name="mode" type="mode.type"/>

<!-- "moment" -->

<xs:attributeGroup name="moment.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="moment.type">
<xs:attributeGroup ref="moment.attlist"/>
</xs:complexType>

<xs:element name="moment" type="moment.type"/>

<!-- "momentabout" -->

<xs:attributeGroup name="momentabout.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:group name="momentabout.content">
<xs:sequence>
<xs:group ref="Content-statistics.class"/>
</xs:sequence>
</xs:group>

<xs:complexType name="momentabout.type">
<xs:group ref="momentabout.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="momentabout.attlist"/>
</xs:complexType>

<xs:element name="momentabout" type="momentabout.type"/>

<!-- And the group of everything -->

<xs:group name="Content-statistics.class">
<xs:choice>
<xs:element ref="mean"/>
<xs:element ref="sdev"/>
<xs:element ref="variance"/>
<xs:element ref="median"/>
<xs:element ref="mode"/>
<xs:element ref="moment"/>
<xs:element ref="momentabout"/>
</xs:choice>
</xs:group>


</xs:schema>


corresponding xml file is here:



<?xml version="1.0" encoding="UTF-8"?>
<document xmlns:CORE="http://www.reallysi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xsi:noNamespaceSchemaLocation="oup.xsd">
<documentinfo publisher="OUPAustralia" title="Test Title - HE" titlenumber="1" isbn13="9780190311360" edition="4" author="Reynolds"/>
<chapter no="2">
<title><num>2</num><head>Inquiry Pedagogy</head></title>
<intro>
<para fo="Y"><txt><b>Good pedagogy</b></txt></para>
<para><txt><b>Research</b></txt></para>
</intro>
</document>


Can anybody help me on this, why this error is occuring. Please provide me suggestion for this.










share|improve this question

























  • Please also post the XML you are trying to validate. Thank you.

    – potame
    Nov 14 '18 at 8:44











  • Hi @potame. I have edited in my question. Please see

    – Scott Don
    Nov 14 '18 at 10:19














0












0








0








I'm having the lot of XSD, which is included with single XSD file and all the files are getting valid well and the corresponding XML file also getting valid against corresponding XSD using oxygen XML editor. But while uploading the xml file against the XSD's file in the product. I'm getting the below error:




Error resolving component 'Definition.attrib'. It was detected that
'Definition.attrib' has no namespace, but components with no target
namespace are not referenceable from schema document




When I opened the corresponding file, it shows validated in oxygen XML editor. Here is the code for the corresponding file:



<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>

<xs:include schemaLocation="common-attrib.xsd"></xs:include>
<xs:include schemaLocation="../common/common-attribs.xsd"></xs:include>

<xs:attributeGroup name="mean.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>


<xs:complexType name="mean.type">
<xs:attributeGroup ref="mean.attlist"/>
</xs:complexType>

<xs:element name="mean" type="mean.type"/>

<xs:attributeGroup name="sdev.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="sdev.type">
<xs:attributeGroup ref="sdev.attlist"/>
</xs:complexType>

<xs:element name="sdev" type="sdev.type"/>

<!-- "variance" -->

<xs:attributeGroup name="variance.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="variance.type">
<xs:attributeGroup ref="variance.attlist"/>
</xs:complexType>

<xs:element name="variance" type="variance.type"/>

<!-- "median" -->

<xs:attributeGroup name="median.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="median.type">
<xs:attributeGroup ref="median.attlist"/>
</xs:complexType>

<xs:element name="median" type="median.type"/>

<!-- "mode" -->

<xs:attributeGroup name="mode.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="mode.type">
<xs:attributeGroup ref="mode.attlist"/>
</xs:complexType>

<xs:element name="mode" type="mode.type"/>

<!-- "moment" -->

<xs:attributeGroup name="moment.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="moment.type">
<xs:attributeGroup ref="moment.attlist"/>
</xs:complexType>

<xs:element name="moment" type="moment.type"/>

<!-- "momentabout" -->

<xs:attributeGroup name="momentabout.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:group name="momentabout.content">
<xs:sequence>
<xs:group ref="Content-statistics.class"/>
</xs:sequence>
</xs:group>

<xs:complexType name="momentabout.type">
<xs:group ref="momentabout.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="momentabout.attlist"/>
</xs:complexType>

<xs:element name="momentabout" type="momentabout.type"/>

<!-- And the group of everything -->

<xs:group name="Content-statistics.class">
<xs:choice>
<xs:element ref="mean"/>
<xs:element ref="sdev"/>
<xs:element ref="variance"/>
<xs:element ref="median"/>
<xs:element ref="mode"/>
<xs:element ref="moment"/>
<xs:element ref="momentabout"/>
</xs:choice>
</xs:group>


</xs:schema>


corresponding xml file is here:



<?xml version="1.0" encoding="UTF-8"?>
<document xmlns:CORE="http://www.reallysi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xsi:noNamespaceSchemaLocation="oup.xsd">
<documentinfo publisher="OUPAustralia" title="Test Title - HE" titlenumber="1" isbn13="9780190311360" edition="4" author="Reynolds"/>
<chapter no="2">
<title><num>2</num><head>Inquiry Pedagogy</head></title>
<intro>
<para fo="Y"><txt><b>Good pedagogy</b></txt></para>
<para><txt><b>Research</b></txt></para>
</intro>
</document>


Can anybody help me on this, why this error is occuring. Please provide me suggestion for this.










share|improve this question
















I'm having the lot of XSD, which is included with single XSD file and all the files are getting valid well and the corresponding XML file also getting valid against corresponding XSD using oxygen XML editor. But while uploading the xml file against the XSD's file in the product. I'm getting the below error:




Error resolving component 'Definition.attrib'. It was detected that
'Definition.attrib' has no namespace, but components with no target
namespace are not referenceable from schema document




When I opened the corresponding file, it shows validated in oxygen XML editor. Here is the code for the corresponding file:



<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>

<xs:include schemaLocation="common-attrib.xsd"></xs:include>
<xs:include schemaLocation="../common/common-attribs.xsd"></xs:include>

<xs:attributeGroup name="mean.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>


<xs:complexType name="mean.type">
<xs:attributeGroup ref="mean.attlist"/>
</xs:complexType>

<xs:element name="mean" type="mean.type"/>

<xs:attributeGroup name="sdev.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="sdev.type">
<xs:attributeGroup ref="sdev.attlist"/>
</xs:complexType>

<xs:element name="sdev" type="sdev.type"/>

<!-- "variance" -->

<xs:attributeGroup name="variance.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="variance.type">
<xs:attributeGroup ref="variance.attlist"/>
</xs:complexType>

<xs:element name="variance" type="variance.type"/>

<!-- "median" -->

<xs:attributeGroup name="median.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="median.type">
<xs:attributeGroup ref="median.attlist"/>
</xs:complexType>

<xs:element name="median" type="median.type"/>

<!-- "mode" -->

<xs:attributeGroup name="mode.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="mode.type">
<xs:attributeGroup ref="mode.attlist"/>
</xs:complexType>

<xs:element name="mode" type="mode.type"/>

<!-- "moment" -->

<xs:attributeGroup name="moment.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="moment.type">
<xs:attributeGroup ref="moment.attlist"/>
</xs:complexType>

<xs:element name="moment" type="moment.type"/>

<!-- "momentabout" -->

<xs:attributeGroup name="momentabout.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:group name="momentabout.content">
<xs:sequence>
<xs:group ref="Content-statistics.class"/>
</xs:sequence>
</xs:group>

<xs:complexType name="momentabout.type">
<xs:group ref="momentabout.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="momentabout.attlist"/>
</xs:complexType>

<xs:element name="momentabout" type="momentabout.type"/>

<!-- And the group of everything -->

<xs:group name="Content-statistics.class">
<xs:choice>
<xs:element ref="mean"/>
<xs:element ref="sdev"/>
<xs:element ref="variance"/>
<xs:element ref="median"/>
<xs:element ref="mode"/>
<xs:element ref="moment"/>
<xs:element ref="momentabout"/>
</xs:choice>
</xs:group>


</xs:schema>


corresponding xml file is here:



<?xml version="1.0" encoding="UTF-8"?>
<document xmlns:CORE="http://www.reallysi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xsi:noNamespaceSchemaLocation="oup.xsd">
<documentinfo publisher="OUPAustralia" title="Test Title - HE" titlenumber="1" isbn13="9780190311360" edition="4" author="Reynolds"/>
<chapter no="2">
<title><num>2</num><head>Inquiry Pedagogy</head></title>
<intro>
<para fo="Y"><txt><b>Good pedagogy</b></txt></para>
<para><txt><b>Research</b></txt></para>
</intro>
</document>


Can anybody help me on this, why this error is occuring. Please provide me suggestion for this.







xml xsd namespaces schema






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 10:17







Scott Don

















asked Nov 14 '18 at 7:03









Scott DonScott Don

408




408













  • Please also post the XML you are trying to validate. Thank you.

    – potame
    Nov 14 '18 at 8:44











  • Hi @potame. I have edited in my question. Please see

    – Scott Don
    Nov 14 '18 at 10:19



















  • Please also post the XML you are trying to validate. Thank you.

    – potame
    Nov 14 '18 at 8:44











  • Hi @potame. I have edited in my question. Please see

    – Scott Don
    Nov 14 '18 at 10:19

















Please also post the XML you are trying to validate. Thank you.

– potame
Nov 14 '18 at 8:44





Please also post the XML you are trying to validate. Thank you.

– potame
Nov 14 '18 at 8:44













Hi @potame. I have edited in my question. Please see

– Scott Don
Nov 14 '18 at 10:19





Hi @potame. I have edited in my question. Please see

– Scott Don
Nov 14 '18 at 10:19












1 Answer
1






active

oldest

votes


















1














You haven't made it clear whether a schema document defining Definition.attrib is reachable from the top-level schema document or not. There seem to be two possibilities: either (a) there is no declaration of this attribute group, or (b) there is a declaration, but it is in the wrong namespace. Either way, you have a dangling reference.



I suspect the reason you are seeing different effects in different environments is that the XSD specification gives some flexibility to processors when there are dangling references like this. The spec encourages processor to carry on regardless so long as the reference is to a component that is not actually needed for validating this instance document. But the rules are somewhat fuzzy.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294725%2fschema-file-name-is-not-detecting-the-namespace%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You haven't made it clear whether a schema document defining Definition.attrib is reachable from the top-level schema document or not. There seem to be two possibilities: either (a) there is no declaration of this attribute group, or (b) there is a declaration, but it is in the wrong namespace. Either way, you have a dangling reference.



    I suspect the reason you are seeing different effects in different environments is that the XSD specification gives some flexibility to processors when there are dangling references like this. The spec encourages processor to carry on regardless so long as the reference is to a component that is not actually needed for validating this instance document. But the rules are somewhat fuzzy.






    share|improve this answer




























      1














      You haven't made it clear whether a schema document defining Definition.attrib is reachable from the top-level schema document or not. There seem to be two possibilities: either (a) there is no declaration of this attribute group, or (b) there is a declaration, but it is in the wrong namespace. Either way, you have a dangling reference.



      I suspect the reason you are seeing different effects in different environments is that the XSD specification gives some flexibility to processors when there are dangling references like this. The spec encourages processor to carry on regardless so long as the reference is to a component that is not actually needed for validating this instance document. But the rules are somewhat fuzzy.






      share|improve this answer


























        1












        1








        1







        You haven't made it clear whether a schema document defining Definition.attrib is reachable from the top-level schema document or not. There seem to be two possibilities: either (a) there is no declaration of this attribute group, or (b) there is a declaration, but it is in the wrong namespace. Either way, you have a dangling reference.



        I suspect the reason you are seeing different effects in different environments is that the XSD specification gives some flexibility to processors when there are dangling references like this. The spec encourages processor to carry on regardless so long as the reference is to a component that is not actually needed for validating this instance document. But the rules are somewhat fuzzy.






        share|improve this answer













        You haven't made it clear whether a schema document defining Definition.attrib is reachable from the top-level schema document or not. There seem to be two possibilities: either (a) there is no declaration of this attribute group, or (b) there is a declaration, but it is in the wrong namespace. Either way, you have a dangling reference.



        I suspect the reason you are seeing different effects in different environments is that the XSD specification gives some flexibility to processors when there are dangling references like this. The spec encourages processor to carry on regardless so long as the reference is to a component that is not actually needed for validating this instance document. But the rules are somewhat fuzzy.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 11:44









        Michael KayMichael Kay

        110k662117




        110k662117
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294725%2fschema-file-name-is-not-detecting-the-namespace%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Error while running script in elastic search , gateway timeout

            Adding quotations to stringified JSON object values