include - xml: is multiple level !ENTITY usage possible? -


We are using XML to define a schema to control content that is displayed in a drawing tool can be done. The schema file specifies what types of objects can be placed on the diagram, how they can be combined together, and what are the properties of these objects (that is, the Settlement property app in the editor).

A new type of schematic is required, a new schema is written, and valid against .xsd. In order to make the schema file more modular and easy to maintain, we are using announcements to include different files. A list of properties, which are united on a particular diagram element, but which can be embedded in many places in the schema, is written separately in the xml file, and then it is included on the relevant location. Say:

  & lt ;! - Naming etc. As an example - & gt; & Lt ;! ENTITY CommonProerties1 system "File: ../ CommonProperties1.xml" & gt; & Lt ;! ENTITY CommonProerties2 system "File: ../ CommonProperties2.xml" & gt;  

And then somewhere in the schema:

  & lt; Node size = "square" & gt; & Amp; CommonProperties1; & Lt ;! - Specific attributes go here - & gt; & Lt; / Node & gt;  

This prevents a lot of copy that makes it difficult, and the complex property is shared with many schemas.

The problem is that now there are basic elements such as groups of flags and iris etc. in common properties too. I would like to create every file (like "Common Properties 1. XML"), such as joining other base sets like "CommonEnums.xml", but I do not think it is possible! ENTITY declarctions.

You can not declare one! ENTITY! Outside a DOCTYPE header, and if you add headers, this makes the top-level xml file invalid because it is a header declaration method 1.2 through the file.

Has anyone ever tried to do such a thing, and what did you do to solve / solve the problem?

xan

Itemprop = "text">

General system organizations were designed to be used as a text included / replacement system. I have seen deep-nosed structures with huge complexity boilerplate.

Then your problem cuts a bit deeper into the statement.

In your example, you think that you can not do such a thing! Announcement of declaration of ENTIT for general anemium in document type declaration such as unit reference and general enummium will be recognized when the unit is parsed? What is special about these system entities that you are having difficulty in harassing? If your goal document is to avoid declaring them during the paragraph of the preamble, then, no, you can not get around it

You can not declare one! ETTE out! DOCTYPE header

This is true in a sense, but there is a useful way of defending you can declare general institutions in an external DTD, in this case their declaration document is in physical form Not visible from. I do not know that this is helpful in your situation, but by declaring your external general system institutions in DTD, you can allow them to "hide" the examples and pieces of the document.

If I suspect that your goals are reusability, modularity, and terseness, then I think that you can do whatever you want through an external DTD. But to take advantage of this facility, you may have to take all the work to create a DTD, to whatever extent necessary to satisfy your DMT processors, which will probably insist on validating your document structures against DTD .


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -