[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Advice needed on placement of datatype validation methods

Subject: Advice needed on placement of datatype validation methods
From: "Amit Rekhi" <amitr@xxxxxxxxxxxxx>
Date: Thu, 8 Oct 1998 07:55:48 +0530
validation for alphabets
               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,


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.