version 1.200, 2007/02/15 08:16:50
|
version 1.201, 2007/05/09 10:55:57
|
Line 1
|
Line 1
|
/* |
/* |
* |
* |
* (c) COPYRIGHT INRIA and W3C, 1996-2005 |
* (c) COPYRIGHT INRIA and W3C, 1996-2007 |
* Please first read the full copyright statement in file COPYRIGHT. |
* Please first read the full copyright statement in file COPYRIGHT. |
* |
* |
*/ |
*/ |
Line 678 ThotBool IsXMLName (const char *path)
|
Line 678 ThotBool IsXMLName (const char *path)
|
!strcmp (suffix, "xhtm") || |
!strcmp (suffix, "xhtm") || |
!strcmp (suffix, "xhtml") || |
!strcmp (suffix, "xhtml") || |
!strcmp (suffix, "smi") || |
!strcmp (suffix, "smi") || |
|
!strcmp (suffix, "xsd") | |
|
!strcmp (suffix, "xslt") | |
|
!strcmp (suffix, "xsl") | |
!strcmp (suffix, "zsl")) |
!strcmp (suffix, "zsl")) |
ret = TRUE; |
ret = TRUE; |
else if (!strcmp (suffix, "gz")) |
else if (!strcmp (suffix, "gz")) |
Line 690 ThotBool IsXMLName (const char *path)
|
Line 693 ThotBool IsXMLName (const char *path)
|
!strcasecmp (suffix, "xtl") || |
!strcasecmp (suffix, "xtl") || |
!strcmp (suffix, "xhtm") || |
!strcmp (suffix, "xhtm") || |
!strcmp (suffix, "xhtml") || |
!strcmp (suffix, "xhtml") || |
!strcmp (suffix, "smi") | |
!strcmp (suffix, "xsd") | |
|
!strcmp (suffix, "xslt") | |
|
!strcmp (suffix, "xsl") | |
|
!strcmp (suffix, "smi")) |
|
ret = TRUE; |
|
else |
|
ret = FALSE; |
|
} |
|
else |
|
ret = FALSE; |
|
|
|
TtaFreeMemory (temppath); |
|
TtaFreeMemory (suffix); |
|
return (ret); |
|
} |
|
|
|
/*---------------------------------------------------------------------- |
|
IsXMLStruct |
|
returns TRUE if path points to an XML transformation or schema. |
|
----------------------------------------------------------------------*/ |
|
ThotBool IsXMLStruct (const char *path) |
|
{ |
|
char *temppath; |
|
char *suffix; |
|
ThotBool ret; |
|
|
|
if (!path) |
|
return (FALSE); |
|
|
|
temppath = TtaStrdup ((char *)path); |
|
suffix = (char *)TtaGetMemory (strlen (path) + 1); |
|
TtaExtractSuffix (temppath, suffix); |
|
|
|
if (!strcmp (suffix, "xsd") | |
|
!strcmp (suffix, "xslt") | |
|
!strcmp (suffix, "xsl")) |
|
ret = TRUE; |
|
else if (!strcmp (suffix, "gz")) |
|
{ |
|
/* take into account compressed files */ |
|
TtaExtractSuffix (temppath, suffix); |
|
if (!strcmp (suffix, "xsd") | |
|
!strcmp (suffix, "xslt") | |
!strcmp (suffix, "xsl")) |
!strcmp (suffix, "xsl")) |
ret = TRUE; |
ret = TRUE; |
else |
else |