in

Quark Forums

Help!!! - Tags rules for exporting XML with avenue.quark

Last post 06-02-2005 6:37 PM by JRS. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-02-2005 2:06

    • oscar
    • Not Ranked
    • Joined on 06-02-2005
    • Posts 1

    Help!!! - Tags rules for exporting XML with avenue.quark

    This is an example that i have to do.

    It supose that i have this dtd:

    <!ELEMENT car(name, price, color, description)>
    <!ELEMENT price (#PCDATA)>
    <!ELEMENT color (#PCDATA)>
    <!ELEMENT description (#PCDATA)>

    and i have this text in a quark document:

    Ferrari Red, only $90000. This car is a demon, it is the best sport car in the world.

    I wanna obtain as result:

    <car>
    <name>Ferrari</name>
    <price>$90000</price>
    <color>red</color>
    <description>This car is a <italic>demon</italic>, it is the best sport car in the world.</description>

    I dont know how i have to do the tag rule for doing that the words what has a italic format, in the xml files appears with the tags <italic></italic>. Is it my dtd ok? or i have to add something? Sad

    Thanks
  • 06-02-2005 6:37 PM In reply to

    • JRS
    • Top 25 Contributor
    • Joined on 05-29-2004
    • Colorado
    • Posts 579

    Help!!! - Tags rules for exporting XML with avenue.quark

    There is nothing special about italic that will let it be tagged absent an element to contain it and a rule to match it. So you do need to add to your DTD. Your Description entry could look like

    <!ELEMENT Description (#PCDATA | ds-italic)*>

    which would allow Description to contain multiple runs of plain text with italic elements nested as needed. (The child element could just be named italic, I'd use ds-italic in case you realize later you'll need other italic child options in your other top elements.)

    You would also have to declare the child element

    <!ELEMENT ds-italic (#PCDATA)>
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems