Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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"?>

<xs:schema xmlns:cfdi="" xmlns:xs="" targetNamespace="" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:element name="Comprobante">

This are the first lines of schema B:

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

<xs:schema xmlns:xs="" xmlns:tfd="" targetNamespace="" 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?



Former Member replied


Two methods to insert one xsd into another.

<xsd:include schemaLocation="pathToFile"> 
should be used for including files of the same namespace.

<xsd:import namespace="namespace" schemaLocation="pathToFile"> 
should be used for include files in a different namespace.
Usually you will specify the namespace given as the targetNamespace
of the imported schema.

*source website:



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question