C:\Sri\QXP-Validate\blib/lib/QXP/Validate.pm


NAME

QXP::Validate


VERSION

Version 1.00


SYNOPSIS

When the strict XML is not used, parsers will not be helpful in validating the document instance. Also, developing a Document type definition for simple markup will not be effective. This module performs the basic functions like validating the inline and stand-alone elements, checking for non-ASCII character in the file, check for dummy characters, check for unintentional key press etc.

    use QXP::Validate;
    my $foo = QXP::Validate->new();
    ...


FUNCTIONS

Parseinline

Will check the presence of the start and end tags for all the inline elements like Italic, Bold etc. All the tags started in the line needs to be closed within the same line. Run this function on a string of text. This will be useful, when you are reading line by line through a file. $stag gives you the number of occurrences for the start tag and $etag gives you the number of occurrences for the end tags.

QXP::Validate->parseinline(``i'');

Parsetag

When you are reading through line by line in a file, this function will store the start and the end tags and increament the counter used for both. Once you have finished reading through the elements, examine the count of $first_parameter. If every opening tag has its respective close tag, the count will be 0. If the value of the variable is >1, it means there are less closing tags than opening tags, on the other hand, if the value is <1 there are less opening tags than closing tags. Call this function using one parameter. The parameter is the tag name which need to be examined.

QXP::Validate->parsetag(``bl'');

Filter Non-ASCII characters

Will parse through the file to check whether any non-ASCII characters are present in the file. In a ASCII file, if there are any binary characters found, the function will report a error on the screen and will quit the execution.

QXP::Validate->chk_nonascii();

Unintentional Characters

Will check and report if any character if found repeating more than three times sequentially in a file. When working on a file, if the keyboarder inserts a series of characters unintentionally, they will be reported as errors.

QXP::Validate->chk_seq();

Dummy tags

In the text file, if there are any elements starting and closing without any content to it, this function will report a error for that.

QXP::Validate->chk_dummy();


AUTHOR

Sriram Rajagopalan, <rjsri at cpan.org>


BUGS

Please report any bugs or feature requests to bug-qxp-validate at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc QXP::Validate

You can also look for information at:


ACKNOWLEDGEMENTS


COPYRIGHT & LICENSE

Copyright 2008 Sriram Rajagopalan, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.