TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:RE: XML ELEMENT value required? From:"David Spreadbury" <David -dot- Spreadbury -at- afc -dot- com> To:"TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com> Date:Fri, 2 Apr 2004 12:40:04 -0800
Ned's question was:
"... can I force an XML element's value to be required ?"
Not if the value was valid.
The way I understand XML, is if the DTD "requires" an attribute, whether it is a valid attribute or not, there better be an attribute there.
-----Original Message-----
From: David Spreadbury
Sent: Friday, April 02, 2004 2:02 PM
To: 'Mark Baker'; TECHWR-L
Subject: RE: XML ELEMENT value required?
Yes, in XML 1.0, it is specified in the DTD as #REQUIRED, which means the element must explicitly provide a value for this attribute each time it is used.
The above excerpted from "Inside XML DTDs, by St. Laurent and Biggar, ISBN 0-07-134621-X.
-----Original Message-----
From: Mark Baker [mailto:listsub -at- analecta -dot- com]
Sent: Friday, April 02, 2004 2:00 PM
To: TECHWR-L
Subject: Re: XML ELEMENT value required?
Ned Bedinger asked:
> In an XML DTD, can I force an XML element's value
> to be
> required ? I want the parser to kick out an error
> if a certain element doesn't have a value.
In a DTD, no. In a schema, yes, by specifying its data type.
You can, of course, check for a value in the prcessing application that
receives the parsed data.
---
Mark Baker
Analecta Communications
www.analecta.com
+1 613 614 5881
Have you tried the latest in Help Authoring from RoboHelp?
Try ROBOHELP X5 for Free - Now with Word 2003 support, Content
Management, Multi-Author support, PDF and XML support and much more!
---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit http://www.raycomm.com/techwhirl/ for more resources and info.