XML Schema for Web Help

Discussion in 'XML' started by Drew Greenwell, Aug 17, 2006.

  1. Hello,
    Can anyone tell me how to write a schema for something like this? Im
    trying to write a webhelp setup and decided to go with a book chapter
    theme but i need to constrain this template to prevent errors and
    provide a log for users down the road.

    <?xml version="1.0" encoding="utf-8"?>
    <template name="" id="1" flags="0" owner="">
    <volume name="" control="" location="local" id="1" flags="0">
    <!-- optional: if volume is local allow-->
    <!--optional-->
    <page id="1" name="" order="1" location="local" flags="0">
    <content><![CDATA[Text]]>Walk</content>
    </page>
    <!--end optional-->
    <book name="" order="1" id="1" flags="0">
    <!--constraint: if exists book name must be filled-->
    <!--optional-->
    <page id="2" order="1" name="" location="local" flags="0">
    <content><![CDATA[Text Here]]></content>
    </page>
    <!--end optional-->
    <!--constraint:"if name is filled but empty flags=1"-->
    <chapter name="" order="1" id="1" flags="0">
    <!--constraint: if exists chapter name must be filled-->
    <!--optional-->
    <page id="3" order="1" name="" location="local" flags="0">
    <content><![CDATA[Other]]></content>
    </page>
    <!--end optional-->
    <!--end constraint-->
    <chapter name="" order="1" id="2" flags="0">
    <!--constraint: if exists chapter name must be filled-->
    <!--optional-->
    <page id="4" order="1" name="" location="local" flags="0">
    <content><![CDATA[Text2]]></content>
    </page>
    <!--end optional-->
    <!--end constraint-->
    </chapter>
    </chapter>
    <!--end constraint-->
    </book>
    <!--end optional-->
    </volume>
    <currentflags>
    <flag flagid="1" type="1" resolved="false"/>
    </currentflags>
    <flagtypes>
    <flagtype typeid="1" name="Chapter" description="In order for a
    Chapter to have content it must be named"/>
    </flagtypes>
    <changelog startdate="" lastchanged="">
    <change changeid="1" changedby="" changedate="" changed="">
    <![CDATA[Text There]]>
    </change>
    </changelog>
    </template>


    I appreciate any help i can get ive been reading up on some xml schema
    stuff but right now it all seems greek to me
     
    Drew Greenwell, Aug 17, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,555
    Markus
    Nov 23, 2005
  2. Fred Smith
    Replies:
    1
    Views:
    949
    Martin Honnen
    Feb 5, 2004
  3. Hari Om
    Replies:
    1
    Views:
    464
    Martin SChukrazy
    Mar 2, 2004
  4. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,270
    Stanimir Stamenkov
    Apr 25, 2005
  5. Replies:
    3
    Views:
    2,876
Loading...

Share This Page