Determine if the supplied chain iterator, is at the start of a legal HTML tag or anti-tag
| Return Type | Function name | Arguments |
|---|---|---|
| hzHtagform& | TagLookup | (hzChain::Iter&,) |
Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp
Function Logic:
Function body:
hzHtagform& TagLookup (hzChain::Iter& ci)
{
// Category: Internet
//
// Determine if the supplied chain iterator, is at the start of a legal HTML tag or anti-tag
//
// Arguments: 1) ci A chain iterator to be tested to see if it is at the begening of an allowed HTML5
//
// Returns: Reference to the tag form for the tag
hzChain W ; // Working chain
chIter xi ; // Internal chain iterator
hzString word ; // Individual word
// If tagmap not loaded, load it
if (!s_htagNam.Count())
InitHtml() ;
xi = ci ;
if (*xi != CHAR_LESS)
return s_tagformDuff ;
xi++ ;
if (*xi == CHAR_FWSLASH)
xi++ ;
for (;;)
{
if (*xi == CHAR_SPACE) break ;
if (*xi == CHAR_MORE) break ;
W.AddByte(*xi) ;
xi++ ;
}
word = W ;
word.ToLower() ;
return s_htagNam[word] ;
}