Loading ...
Sorry, an error occurred while loading the content.

Mixing #PCDATA with tags

Expand Messages
  • madtimebat
    How do you make a ELEMENT in a DTD for a mixing a text and tags? An example is in HTML when you mix regular text with bold text. TEST TEST TEST I can t
    Message 1 of 3 , Apr 1 5:23 AM
    • 0 Attachment
      How do you make a ELEMENT in a DTD for a mixing a text and tags? An
      example is in HTML when you mix regular text with bold text.
      TEST<B>TEST</B>TEST
      I can't seem to figure it out, but I am sure it is simple. If you
      could help push me in the right direction, I would be very greatful.
    • Pierre Attar
      In the XML standard, this is called mixed contents. Pierre ... Pierre Attar (mailto:patt@tireme.fr) Projet Mutualiser l effort de
      Message 2 of 3 , Apr 1 5:36 AM
      • 0 Attachment
        <!ELEMENT P (#PCDATA|B)* >

        In the XML standard, this is called mixed contents.

        Pierre

        At 15:23 01/04/2002, you wrote:
        >How do you make a ELEMENT in a DTD for a mixing a text and tags? An
        >example is in HTML when you mix regular text with bold text.
        >TEST<B>TEST</B>TEST
        >I can't seem to figure it out, but I am sure it is simple. If you
        >could help push me in the right direction, I would be very greatful.
        >-----------

        Pierre Attar (mailto:patt@...)

        Projet "Mutualiser l'effort de montée en compétences sur XML"
        http://www.mutu-xml.org/index.html
        Projet "Un répertoire de modèles pour les applications d'XML"
        http://www.repertoire-modeles.org
      • Steve Hoenisch
        Declaring mixed content can get tricky. The key is to remember these three points: *PCDATA must be declared in the rule first. *All the items in the rule must
        Message 3 of 3 , Apr 1 10:17 AM
        • 0 Attachment
          Declaring mixed content can get tricky. The key is to remember these three
          points:
          *PCDATA must be declared in the rule first.
          *All the items in the rule must be separated by the vertical bar indicating
          choice.
          *The rule must be marked as optional and repeatable with an asterisk placed
          outside the rule's parentheses.

          Example: <!ELEMENT paragraph (#PCDATA | cite | emphasis | bold )*>


          Talk to you soon, Steve Hoenisch.

          ----- Original Message -----
          From: "madtimebat" <madtimebat@...>
          To: <xml-doc@yahoogroups.com>
          Sent: Monday, April 01, 2002 8:23 AM
          Subject: [xml-doc] Mixing #PCDATA with tags


          > How do you make a ELEMENT in a DTD for a mixing a text and tags? An
          > example is in HTML when you mix regular text with bold text.
          > TEST<B>TEST</B>TEST
          > I can't seem to figure it out, but I am sure it is simple. If you
          > could help push me in the right direction, I would be very greatful.
        Your message has been successfully submitted and would be delivered to recipients shortly.