R
R
Rodion2018-10-03 18:23:14
XSD
Rodion, 2018-10-03 18:23:14

Downgrade XML schemas: how to remove unnecessary tags/properties?

Hello!
There is a certain system that accepts / gives data in the form of XML files (there is a schema dtd file, about 20 kb). The system has different versions and the files are compatible from the bottom up, i.e. files from the version system, say 2, are accepted by the version 3 system. But files are not accepted in the opposite direction, because. From version to version, the schema expands evolutionarily, and, accordingly, the system does not accept files with line tags/properties for the current schema.
Question: how can I bring an xml file with a new schema to the old schema (by deleting all new tags\properties)?
Do not offer hands, files of 700-800 kb, in the scheme ~ 100 tags and > 200 properties.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward Tibet, 2018-10-11
@eduardtibet

You can (and should) manipulate XML in any way using XSLT.
The question is not in this, but in what you will get in the end. What is the logical essence of the new data.
Let's say in the new scheme (I give a real example of DocBook of different versions):

<section>
<section><para></para></section>
</section>

And in the old one:
<sect1>
<sect2><para></para></sect2>
</sect1>

You can physically delete all sect1 and sect2, but you will essentially lose the document data.
Therefore, the question should not be asked how to remove new tags, but how to rebuild xml logically without losing data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question