Membership Database/Validating

From PCSAR

< Membership Database(Difference between revisions)
Jump to: navigation, search
Current revision (04:56, 1 October 2013) (edit) (undo)
 
(One intermediate revision not shown.)
Line 6: Line 6:
'''Sample Error Messages:'''
'''Sample Error Messages:'''
-
==Comments:==
+
==Comments==
If when validating, you get the error message:
If when validating, you get the error message:
Line 20: Line 20:
not being well-formed. For instance, if you remove the exclamation mark, or don't have the exact four characters &lt!-- all together, that error will be produced.
not being well-formed. For instance, if you remove the exclamation mark, or don't have the exact four characters &lt!-- all together, that error will be produced.
-
==End Tags:==
+
==End Tags==
example:
example:
Line 42: Line 42:
figure out the > isn't coming.
figure out the > isn't coming.
-
==Embedded Double Quotes:==
+
==Embedded Double Quotes==
example:
example:

Current revision

The membership database is validated after it has been edited. Validation verifies that the fields are properly set up. The database is checked to make sure it is proper XML and that it follows the rules (schema) for the database.

Sample Error Messages:

[edit] Comments

If when validating, you get the error message:


 Fatal error at line:1, column:2 of 
 file:/Users/bob/sar/pc/membership/personnel-database.xml
   The markup in the document preceding the root element must be well-formed.

It may be caused by the comment on the first line which looks like:


 not being well-formed.  For instance, if you remove the exclamation mark, or don't have the exact four characters &lt!-- all together, that error will be produced.

[edit] End Tags

example:


 Fatal error at line:10,907, column:1 of file:/home/wuth/tmp/personnel-database.xml
   The end-tag for element type "Member" must end with a '>' delimiter.

An end-tag is a tag that ends a region. The end-tag has the same name as the corresponding start-tag, but starts with a slash.

In this case we're talking about:


 <Member ...>
 ...
 </Member>

The complaint is that the </Member> is missing the final >. The line number given is a few lines (7 lines) after the actual error, probably because it takes the parser a few lines to figure out the > isn't coming.

[edit] Embedded Double Quotes

example:


 Fatal error at line:10,965, column:34 of file:/home/wuth/sar/pc/membership/personnel-database.xml
   Element type "Member" must be followed by either attribute specifications, ">" or "/>".

In this case the complaint is about the line:


       MailToAddress="#1-2345-6"A"Ave.S"

The problem is the double quotes around "A" in 6"A" Ave. The first double quote is taken as the end of the address. The remaining A"Ave.S" looks like junk and causes the program to choke.

In this case, the simplest solution is to remove the extra double quotes:


       MailToAddress="#1-2345-6A Ave.S"

If in another case, you strongly needed to include double quotes as part of the string, you could use:


  "

as in:


       MailToAddress="#1-2345-6"A"Ave.S"

to represent the same thing. This is admittedly more awkward.

Personal tools