XML Schema for Web Help

D

Drew Greenwell

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top