OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Advice needed on placement of XML datatype validation methods

[ Lists Home | Date Index | Thread Index ]
  • From: "Amit Rekhi" <amitr@abinfosys.com>
  • To: "Xml-Dev (E-mail)" <xml-dev@ic.ac.uk>
  • Date: Thu, 1 Oct 1998 18:25:14 +0530

               I am in the process of attaching datatype validation routines
for element content in my XML file. I have come up with 2 approaches (as
listed below)., but am not sure which is a better one.  If someone could
give their expert opinions ....


I can use NOTATIONS to identify data validation processes with element
content. eg.

<?xml version="1.0" ?>
<!DOCTYPE start-ele [
   <!NOTATION Alphabet SYSTEM "AlphabetChecker.vld">
   <!NOTATION Number SYSTEM "NumberChecker.vld">

   <!ELEMENT start-ele (#PCDATA)>
   <!ATTLIST start-ele datatype NOTATION (Alphabet|Number) "Alphabet">
<start-ele datatype="Number">123</start-ele>

where AlphabetChecker.vld and NumberChecker.vld could contain  validation
routines for checking alphabet and number datatypes.


I embed my datatype validation scripts in the XSL file I attach to my XML
data.I can embed my datatype validation scripts in HTML which will be
outputted by my XSL file (I am using XSL to do XML -> HTML transformation)
for elements in the XML file. In this case I could possibly use
(JScript/VBScript/JavaScript) as languages to implement my datatype
validation routines.

Which of the 2 approaches is better?

These 2 approaches bring out the basic questions:-

 Where to place datatype validation routines for element content, in the
XML-DTD or in the XSL file attached to the XML data?

                    Thanks in advance,


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS