version 1.379, 2007/04/13 14:24:00
|
version 1.380, 2007/04/24 15:37:12
|
Line 6171 static char *ParseGenericSelector (char
|
Line 6171 static char *ParseGenericSelector (char
|
int att, kind; |
int att, kind; |
int specificity, xmlType; |
int specificity, xmlType; |
int skippedNL; |
int skippedNL; |
ThotBool isHTML; |
ThotBool isHTML, noname; |
ThotBool level, quoted, doubleColon; |
ThotBool level, quoted, doubleColon; |
#define ATTR_ID 1 |
#define ATTR_ID 1 |
#define ATTR_CLASS 2 |
#define ATTR_CLASS 2 |
Line 6227 static char *ParseGenericSelector (char
|
Line 6227 static char *ParseGenericSelector (char
|
!TtaIsBlank (selector)) |
!TtaIsBlank (selector)) |
*cur++ = *selector++; |
*cur++ = *selector++; |
*cur++ = EOS; /* close the first string in sel[] */ |
*cur++ = EOS; /* close the first string in sel[] */ |
|
noname = TRUE; |
if (deb[0] != EOS) |
if (deb[0] != EOS) |
/* the selector starts with an element name */ |
/* the selector starts with an element name */ |
{ |
{ |
if (deb[0] <= 64 && deb[0] != '*') |
if (deb[0] <= 64 && deb[0] != '*') |
{ |
{ |
CSSPrintError ("Invalid element", deb); |
CSSPrintError ("Invalid element", deb); |
return NULL; |
names[0] = NULL; /* no element name */ |
|
DoApply = FALSE; |
} |
} |
else |
else |
{ |
{ |
|
noname = FALSE; |
names[0] = deb; |
names[0] = deb; |
if (!strcmp (names[0], "html")) |
if (!strcmp (names[0], "html")) |
/* give a greater priority to the backgoud color of html */ |
/* give a greater priority to the backgoud color of html */ |
Line 6251 static char *ParseGenericSelector (char
|
Line 6254 static char *ParseGenericSelector (char
|
names[0] = NULL; /* no element name */ |
names[0] = NULL; /* no element name */ |
|
|
rel[0] = RelVoid; |
rel[0] = RelVoid; |
|
|
/* now names[0] points to the beginning of the parsed item |
/* now names[0] points to the beginning of the parsed item |
and cur to the next string to be parsed */ |
and cur to the next string to be parsed */ |
while (*selector == '.' || *selector == ':' || |
while (*selector == '.' || *selector == ':' || |
Line 6639 static char *ParseGenericSelector (char
|
Line 6641 static char *ParseGenericSelector (char
|
selector = SkipBlanksAndComments (selector); |
selector = SkipBlanksAndComments (selector); |
NewLineSkipped = skippedNL; |
NewLineSkipped = skippedNL; |
|
|
|
if (noname && !pseudoFirstChild[0] && attrnums[0] == 0 && attrnames[0] == NULL) |
|
{ |
|
*cur++ = EOS; |
|
CSSPrintError ("Invalid Selector", deb); |
|
DoApply = FALSE; |
|
} |
/* is it a multi-level selector? */ |
/* is it a multi-level selector? */ |
if (*selector == EOS) |
if (*selector == EOS) |
/* end of the selector */ |
/* end of the selector */ |
Line 6653 static char *ParseGenericSelector (char
|
Line 6661 static char *ParseGenericSelector (char
|
if (*next == EOS) |
if (*next == EOS) |
/* nothing after the comma. Invalid selector */ |
/* nothing after the comma. Invalid selector */ |
{ |
{ |
/*CSSPrintError ("Syntax error:", selector);*/ |
CSSPrintError ("Syntax error:", selector); |
return NULL; |
selector = NULL; |
} |
} |
break; |
break; |
} |
} |
Line 7054 static char *ParseGenericSelector (char
|
Line 7062 static char *ParseGenericSelector (char
|
isHTML = (strcmp (schemaName, "HTML") == 0); |
isHTML = (strcmp (schemaName, "HTML") == 0); |
tsch = GetPExtension (doc, ctxt->schema, css, link); |
tsch = GetPExtension (doc, ctxt->schema, css, link); |
skippedNL = NewLineSkipped; |
skippedNL = NewLineSkipped; |
if (tsch && cssRule) |
if (DoApply && tsch && cssRule) |
{ |
{ |
if (css) |
if (css) |
{ |
{ |