Skip to Content

Problems with nested xsd schema in Design

Hi experts,

I'm developing a new sender interface in which we receive an xml file.

Other party gave us xsd schema to use in interface design.

My problem is that they gave us 2 schemas, and Schema B is nested into Schema A, and Schema A has tag named "cfdi" and Schema B has tag named "tfd"

This are the first lines of schema A:

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

http://www.sat.gob.mx/cfd/3" xmlns:xs=" http://www.w3.org/2001/XMLSchema" targetNamespace=" http://www.sat.gob.mx/cfd/3" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:element name="Comprobante">

This are the first lines of schema B:

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

http://www.w3.org/2001/XMLSchema" xmlns:tfd=" http://www.sat.gob.mx/TimbreFiscalDigital" targetNamespace=" http://www.sat.gob.mx/TimbreFiscalDigital" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:element name="TimbreFiscalDigital">

I've tried to inserto Schema B as an element of Schema A, but I'm not sure that is the correct way to proceed, I've problem with the different names of tags (cfdi and tfd) can you help me?

Thanks

Fabio

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 16, 2011 at 10:10 AM

    have u tried to import both the XSD as external definition. R u facing any issue while doing so...

    thanks

    chirag

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 16, 2011 at 10:12 AM

    hi ,

    I've tried to inserto Schema B as an element of Schema A, but I'm not sure that is the correct way to proceed, I've problem with the different names of tags (cfdi and tfd)

    As per my knowledge that is not correct to insert Schema B as an element of Schema A because tag names and name spaces both are different .

    are you imported both the XSD's through Import External defiinitions from tool?

    thanks,

    Edited by: bhavanisankar.solasu on Dec 16, 2011 11:33 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 16, 2011 at 10:49 AM

    Assuming the third party has given you 2 xsds schema B and Schema A.

    Your Schema A must contain a

    <xsd:import namespace ="..." schemaLocation = "schemaB.xsd"/>

    or

    <xsd:include schemaLocation="schemaB.xsd"/>

    If this is not the case, then the xsds are not nested. You need to edit them manually to get it right.

    Once you are done with this you can import both of them into ESR and start using the schema A (base xsd) in your mappings. It will resolve the types in schema B automatically.

    Jai

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2011 at 01:09 PM

    Problem solved!!

    thank you

    Add comment
    10|10000 characters needed characters exceeded