version 1.48, 2001/07/09 07:46:05
|
version 1.49, 2001/09/05 12:42:09
|
Line 19
|
Line 19
|
#include "parser.h" |
#include "parser.h" |
#include "HTMLnames.h" |
#include "HTMLnames.h" |
#include "MathMLnames.h" |
#include "MathMLnames.h" |
#include "GraphMLnames.h" |
#include "SVGnames.h" |
#include "XLinknames.h" |
#include "XLinknames.h" |
|
|
/* define some pointers to let other parser functions access the local table */ |
/* define some pointers to let other parser functions access the local table */ |
Line 66 SSchema GetMathMLSSchema (Docume
|
Line 66 SSchema GetMathMLSSchema (Docume
|
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
GetGraphMLSSchema returns the GraphML Thot schema for document doc. |
GetSVGSSchema returns the SVG Thot schema for document doc. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
SSchema GetGraphMLSSchema (Document doc) |
SSchema GetSVGSSchema (Document doc) |
|
|
{ |
{ |
SSchema GraphMLSSchema; |
SSchema SVGSSchema; |
|
|
GraphMLSSchema = TtaGetSSchema ("GraphML", doc); |
SVGSSchema = TtaGetSSchema ("SVG", doc); |
if (GraphMLSSchema == NULL) |
if (SVGSSchema == NULL) |
GraphMLSSchema = TtaNewNature(doc, |
SVGSSchema = TtaNewNature(doc, |
TtaGetDocumentSSchema(doc), |
TtaGetDocumentSSchema(doc), |
"GraphML", "GraphMLP"); |
"SVG", "SVGP"); |
return (GraphMLSSchema); |
return (SVGSSchema); |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 140 SSchema GetXMLSSchema (int XMLtype, Docu
|
Line 140 SSchema GetXMLSSchema (int XMLtype, Docu
|
else if (XMLtype == MATH_TYPE) |
else if (XMLtype == MATH_TYPE) |
return GetMathMLSSchema (doc); |
return GetMathMLSSchema (doc); |
else if (XMLtype == GRAPH_TYPE) |
else if (XMLtype == GRAPH_TYPE) |
return GetGraphMLSSchema (doc); |
return GetSVGSSchema (doc); |
else if (XMLtype == XLINK_TYPE) |
else if (XMLtype == XLINK_TYPE) |
return GetXLinkSSchema (doc); |
return GetXLinkSSchema (doc); |
else |
else |
Line 196 void MapXMLElementType (int XMLtype,
|
Line 196 void MapXMLElementType (int XMLtype,
|
*highEnoughLevel = FALSE; |
*highEnoughLevel = FALSE; |
} |
} |
else |
else |
ptr = GraphMLElemMappingTable; |
ptr = SVGElemMappingTable; |
} |
} |
else |
else |
ptr = NULL; |
ptr = NULL; |
Line 252 char* GetXMLElementName (Eleme
|
Line 252 char* GetXMLElementName (Eleme
|
name = TtaGetSSchemaName (elType.ElSSchema); |
name = TtaGetSSchemaName (elType.ElSSchema); |
if (strcmp ("MathML", name) == 0) |
if (strcmp ("MathML", name) == 0) |
ptr = MathMLElemMappingTable; |
ptr = MathMLElemMappingTable; |
else if (strcmp ("GraphML", name) == 0) |
else if (strcmp ("SVG", name) == 0) |
ptr = GraphMLElemMappingTable; |
ptr = SVGElemMappingTable; |
else |
else |
ptr = XHTMLElemMappingTable; |
ptr = XHTMLElemMappingTable; |
|
|
Line 300 ThotBool IsXMLElementInline (Ele
|
Line 300 ThotBool IsXMLElementInline (Ele
|
name = TtaGetSSchemaName (elType.ElSSchema); |
name = TtaGetSSchemaName (elType.ElSSchema); |
if (strcmp ("MathML", name) == 0) |
if (strcmp ("MathML", name) == 0) |
ptr = MathMLElemMappingTable; |
ptr = MathMLElemMappingTable; |
else if (strcmp ("GraphML", name) == 0) |
else if (strcmp ("SVG", name) == 0) |
ptr = GraphMLElemMappingTable; |
ptr = SVGElemMappingTable; |
else |
else |
ptr = XHTMLElemMappingTable; |
ptr = XHTMLElemMappingTable; |
|
|
Line 341 int MapXMLAttribute (int XMLtype,
|
Line 341 int MapXMLAttribute (int XMLtype,
|
else if (XMLtype == MATH_TYPE) |
else if (XMLtype == MATH_TYPE) |
ptr = MathMLAttributeMappingTable; |
ptr = MathMLAttributeMappingTable; |
else if (XMLtype == GRAPH_TYPE) |
else if (XMLtype == GRAPH_TYPE) |
ptr = GraphMLAttributeMappingTable; |
ptr = SVGAttributeMappingTable; |
else if (XMLtype == XLINK_TYPE) |
else if (XMLtype == XLINK_TYPE) |
ptr = XLinkAttributeMappingTable; |
ptr = XLinkAttributeMappingTable; |
else |
else |
Line 404 char* GetXMLAttributeName (Att
|
Line 404 char* GetXMLAttributeName (Att
|
name = TtaGetSSchemaName (attrType.AttrSSchema); |
name = TtaGetSSchemaName (attrType.AttrSSchema); |
if (strcmp ("MathML", name) == 0) |
if (strcmp ("MathML", name) == 0) |
ptr = MathMLAttributeMappingTable; |
ptr = MathMLAttributeMappingTable; |
else if (strcmp ("GraphML", name) == 0) |
else if (strcmp ("SVG", name) == 0) |
ptr = GraphMLAttributeMappingTable; |
ptr = SVGAttributeMappingTable; |
else if (strcmp ("XLink", name) == 0) |
else if (strcmp ("XLink", name) == 0) |
ptr = XLinkAttributeMappingTable; |
ptr = XLinkAttributeMappingTable; |
else |
else |