dtd in xml umwandeln

bei netbeans könnte ichs mir nocht gut vorstellen oder eclipse mit entsprechenden Plugins :bahnhof:.
 
Ich benutze eclipse und habe folgendes gefunden:
Creating XML files Tutorial

Wenn ich das root-Element auswählen soll, ist die liste disabled. 😀

mein dtd-file sieht so aus:
Java:
<!-- ...................................................................... -->
<!-- XHTML 1.0 Client-side Image Map Module  .............................. -->
<!-- file: XHTML1-csismap.mod

     This is XHTML 1.0, an XML reformulation of HTML 4.0.
     Copyright 1999 Sun Microsystems, Inc., All rights reserved.
     $Id: @(#)XHTML1-csismap.mod 1.7 99/02/02 SMI $

     This DTD module is identified by the PUBLIC and SYSTEM identifiers:

     PUBLIC "-//Sun Microsystems//ELEMENTS XHTML 1.0 Client-side Image Maps//EN"
     SYSTEM "XHTML1-csismap.mod"

     Revisions:
# 1999-01-31  fixed map content model (errata)
     ....................................................................... -->

<!-- d3.3. Client-side Image Maps

        area, map
-->

<!-- These can be placed in the same document or grouped in a
     separate document although this isn't yet widely supported -->

<!ELEMENT map  (( %Heading.class; | %List.class; | %Block.mix; ) | area)+ >
<!ATTLIST map
      %Common.attrib;
      name         CDATA                    #REQUIRED
>

<!ELEMENT area  EMPTY >
<!ATTLIST area
      %Common.attrib;
      href         %URI;                    #IMPLIED
      shape        %Shape;                  'rect'
      coords       %Coords;                 #IMPLIED
      nohref       (nohref)                 #IMPLIED
      alt          %Text;                   #REQUIRED
      tabindex     %Number;                 #IMPLIED
      accesskey    %Character;              #IMPLIED
      onfocus      %Script;                 #IMPLIED
      onblur       %Script;                 #IMPLIED
>

<!-- modify anchor (<a>) attribute definition list to 
     allow for client-side image maps -->

<!ATTLIST a
      shape        %Shape;                  'rect'
      coords       %Coords;                 #IMPLIED
>

<!-- end of XHTML1-csismap.mod -->

ich kenn mich bei dtd nicht aus, ist das in ordnung so?
welches soll das root-element sein, ich sehe da keins 😀

-> http://www.altheim.com/specs/xhtml/XHTML1-csismap.mod

bei diesem test-file ist die liste auch disabled

Java:
<?xml version = "1.0" encoding="iso-8859-1"?>
<!DOCTYPE personen [
<!ELEMENT personen      (person)*>
<!-- person: arzt, patient -->
<!ELEMENT person        (arzt|patient)>
<!ELEMENT arzt          (name, vorname, (strasse, plz, ort)? )> <!-- "arzt" -->
<!ELEMENT patient       (name, vorname, strasse, plz, ort, diagnosen*)>
<!ELEMENT diagnosen     (diagnose*)>
<!ELEMENT name          (#PCDATA)>
<!ELEMENT vorname       (#PCDATA)>
<!ELEMENT strasse       (#PCDATA)>
<!ELEMENT plz           (#PCDATA)>
<!ELEMENT ort           (#PCDATA)>
<!ELEMENT diagnose      (#PCDATA)>

<!ATTLIST patient 
	pat_id   CDATA                  #REQUIRED
	kennung  (intern|extern|beides) #REQUIRED
	hausarzt IDREF                  #IMPLIED> 	
<!ATTLIST arzt
	lfdnr    ID                     #REQUIRED>
] >
 
im ersten wirds wohl [c]map[/c] sein und im zweiten(test-file) ist es [c]personen[/c]
 
Das wäre aber dann ein XML das zwar die Struktur wiederspiegelt aber irgendwelche sinnfreien Werte eingesetzt hat? Quasi eben ein Demo-XML wie es später aussehen könnte?
Sonst würde dein Wunsch keinen Sinn machen.
 

Zurück
Oben