# XML weitere Verschachtelung umsetzen

**URL:** <https://metadaten.community/t/xml-weitere-verschachtelung-umsetzen/240>\
**Category:** Metafacture\
**Tags:** morph\
**Created:** [5. März 2024 um 10:03 UTC](https://metadaten.community/t/xml-weitere-verschachtelung-umsetzen/240 "2024-03-05T10:03:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tracy\_Arndt](https://metadaten.community/letter_avatar_proxy/v4/letter/t/b5ac83/32.png) [@Tracy\_Arndt](https://metadaten.community/u/Tracy_Arndt)\
**Post date:** [5. März 2024 um 10:03 UTC](https://metadaten.community/t/xml-weitere-verschachtelung-umsetzen/240/1 "2024-03-05T10:03:43Z")

</div>

Ich habe ein Morph-Skript mit dem aus PICA RDFxml erstellt wird. Für eine Aussage ist es notwendig eine weitere rdf:Description hinzuzufügen.

Siehe den [Workflow im Metafacture-Playground](https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-lines%0A%7Cdecode-pica%0A%7Cmorph%28transformationFile%29%0A%7Crdf-macros%0A%7Cencode-xml%28recordtag%3D%22rdf%3ADescription%22%2C+roottag%3D%22rdf%3ARDF%22%29%0A%7Cprint%0A%3B&transformation=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Cmetamorph+xmlns%3D%22http%3A//www.culturegraph.org/metamorph%22+xmlns%3Axsi%3D%22http%3A//www.w3.org/2001/XMLSchema-instance%22%0A%09version%3D%221%22%3E%0A%09%3Crules%3E%0A%09%09%3Centity+name%3D%22%2Awdrs%3Adescribedby%22+reset%3D%22true%22%3E%0A%09%09%09%3Cdata+name%3D%22_exid%22+source%3D%22007K.0%22%3E%0A%09%09%09%09%3Ccompose+prefix%3D%22https%3A//d-nb.info/gnd/%22+/%3E%0A%09%09%09%09%3Ccompose+postfix%3D%22/about%22+/%3E%0A%09%09%09%3C/data%3E%0A%09%09%09%3Cdata+name%3D%22%2Adcterms%3Alicense%22+source%3D%22001B.0%22%3E%0A%09%09%09%09%3Cconstant+value%3D%22http%3A//creativecommons.org/publicdomain/zero/1.0/%22/%3E%0A%09%09%09%3C/data%3E%0A++++++++++++%3Cdata+name%3D%22%2Agndo%3AdescriptionLevel%22+source%3D%22002@.0%22%3E%0A++++++++++++++++%3Csubstring+start%3D%222%22+end%3D%223%22+/%3E%0A++++++++++++++++%3Ccompose+prefix%3D%22https%3A//d-nb.info/standards/vocab/gnd/description-level%23%22+/%3E%0A++++++++++++%3C/data%3E%0A%09%09%3C/entity%3E%0A%0A%09%09%3Cdata+source%3D%22003U.a%22+name%3D%22~rdf%3Aabout%22%3E%0A%09%09%09%3Coccurrence+only%3D%221%22/%3E%0A%09%09%09%3Creplace+pattern%3D%22http%3A%22+with%3D%22https%3A%22+/%3E%0A%09%09%3C/data%3E%0A%0A%09%09%3Cdata+source%3D%22007K.0%22+name%3D%22gndo%3AgndIdentifier%22+/%3E%0A%09%3C/rules%3E%0A%3C/metamorph%3E&data=001A+%1F08121%3A29-11-21%1E001B+%1F08121%3A29-11-21%1Ft10%3A33%3A03.000%1E001D+%1F08121%3A29-11-21%1E001U+%1F0utf8%1E001X+%1F00%1E002@+%1F0Ts2%1E003@+%1F01246696991%1E003U+%1Fahttp%3A//d-nb.info/gnd/1246696991%1E004B+%1Fasaz%1Fasag%1E007K+%1Fagnd%1F01246696991%1E008A+%1Fas%1E010E+%1Fbger%1Ffrswk%1E041@+%1FaDudlerin%1E041A+%1FaJodlerin%1E041R+%1F9040512460%1F7Ts1%1FVsaz%1FAgnd%1F04051246-0%1FaSa%CC%88ngerin%1F4obge%1E041R+%1F9041627547%1F7Ts1%1FAgnd%1F04162754-4%1FaJodler%1F4vbal%1E042A+%1Fa17.4%1E047A/03+%1FeAT-OeAW%1E047A/03+%1FrAT-OBV%1E050E+%1Faanalog%1E070A/03+%1F09819375368900041%1E%0A).

Soll Ergebnis:

```xml
<wdrs:describedby>
  <rdf:Description rdf:about="https://d-nb.info/gnd/1246696991/about">
[...]
  </rdf:Description>
</wdrs:describedby>

```

Ich komm gerade nicht darauf, wie ich das umsetze… Hat jemand eine Idee?

---

<div class="post-metadata">

**Author:** ![dr0i](https://metadaten.community/user_avatar/metadaten.community/dr0i/32/29_2.png) [@dr0i](https://metadaten.community/u/dr0i)\
**Post date:** [5. März 2024 um 10:35 UTC](https://metadaten.community/t/xml-weitere-verschachtelung-umsetzen/240/2 "2024-03-05T10:35:32Z")

</div>

Hallo Tracy,  
herzlich willkommen im metadaten.community-Forum!

Du benötigst eine `entity in entity` Verschachetlung. Das Morph-Skript müsste also so aussehen:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<metamorph xmlns="http://www.culturegraph.org/metamorph" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1">
  <rules>
    <entity name="rdf:Description">
      <data name="~rdf:about" source="003U.a">
        <occurrence only="1"/>
        <replace pattern="http:" with="https:"/>
        <compose postfix="/about"/>
      </data>
      <entity name="wdrs:describedby" reset="true">
        <data name="_exid" source="007K.0">
          <compose prefix="https://d-nb.info/gnd/"/>
          <compose postfix="/about"/>
        </data>
        <data name="*dcterms:license" source="001B.0">
          <constant value="http://creativecommons.org/publicdomain/zero/1.0/"/>
        </data>
        <data name="*gndo:descriptionLevel" source="002@.0">
          <substring start="2" end="3"/>
          <compose prefix="https://d-nb.info/standards/vocab/gnd/description-level#"/>
        </data>
      </entity>
    </entity>
    <data source="007K.0" name="gndo:gndIdentifier"/>
  </rules>
</metamorph>

```

---

<div class="post-metadata">

**Author:** ![Tracy\_Arndt](https://metadaten.community/letter_avatar_proxy/v4/letter/t/b5ac83/32.png) [@Tracy\_Arndt](https://metadaten.community/u/Tracy_Arndt)\
**Post date:** [5. März 2024 um 10:53 UTC](https://metadaten.community/t/xml-weitere-verschachtelung-umsetzen/240/3 "2024-03-05T10:53:05Z")

</div>

Ja, natürlich! Eine weitere Verschachtelung!  
Danke! 😉
