SRC_C = $(foreach dir,src/snark,$(wildcard src/snark/*.c))
OBJ_CXX = $(patsubst src/snark/%.cpp,build/%.o,$(SRC_CXX))
OBJ_C = $(patsubst src/snark/%.c,build/%.o,$(SRC_C))
-INCLUDES = -I./include -I$(XERCES)/include $(addprefix -I,$(DIGFILED),$(DIGFILESD),$(DIGFILERD)) -Iinclude/DIGFile -Iinclude/DIGFileSnark -Iinclude/DIGRand -I/usr/include
+INCLUDES = -I./include $(addprefix -I,$(DIGFILED),$(DIGFILESD),$(DIGFILERD)) -Iinclude/DIGFile -Iinclude/DIGFileSnark -Iinclude/DIGRand -I/usr/include
-LIBPATH = -L$(PREFIX)/lib -L$(XERCES)/lib
-LIBS = $(LIBPATH) -lm -lxerces-c -lxerces-depdom -lDIGFile -lDIGFileSnark -lDIGRand
+#LIBPATH = -L$(PREFIX)/lib -L$(XERCES)/lib
+LIBPATH = -L$(PREFIX)/lib
+LIBS = $(LIBPATH) -lm -lxerces-c -lDIGFile -lDIGFileSnark -lDIGRand
SNARK14 = snark14
INPUT = snark14Input
all: $(OBJDIR) $(LIBSDIR) $(BINDIR) $(BINDIR)/$(SNARK14) $(BINDIR)/$(DISPLAY) $(BINDIR)/$(INPUT)
$(BINDIR)/$(SNARK14): $(LDIGFILED) $(LDIGFILESD) $(LDIGFILERD) $(OBJ_C) $(OBJ_CXX)
- $(LD) $(LIBS) $(LDFLAGS) -o bin/$(SNARK14) $(OBJ_C) $(OBJ_CXX)
+ $(LD) $(LIBPATH) $(LDFLAGS) $(OBJ_C) $(OBJ_CXX) $(LIBS) -o bin/$(SNARK14)
$(BINDIR)/$(DISPLAY): $(DISPLAY_SRC) $(DISPLAY_INC)
cd tools/Display ; make
///DOMPrintFilter *myFilter = 0;
try {
- // get a serializer, an instance of DOMWriter
+ // get a serializer, an instance of DOMWriter (kmr Now DOMLSSerializer)
XMLCh tempStr[100];
XMLString::transcode("LS", tempStr, 99);
DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
- DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
-
+ DOMLSSerializer *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
+ DOMConfiguration *dc = theSerializer->getDomConfig();
+ DOMLSOutput* theOutput = ((DOMImplementationLS*)impl)->createLSOutput();
+ theOutput->setByteStream(mymFormTarget);
+
// set user specified end of line sequence and output encoding
//theSerializer->setNewLine(gMyEOLSequence);
static XMLCh* gOutputEncoding = 0;
- theSerializer->setEncoding(gOutputEncoding);
-
+ // kmr theSerializer->setEncoding(gOutputEncoding);
+ theOutput->setEncoding(gOutputEncoding);
+
// plug in user's own filter
/*
if(gUseFilter) {
// plug in user's own error handler
DOMErrorHandler* myErrorHandler = new DOMPrintErrorHandler();
- theSerializer->setErrorHandler(myErrorHandler);
+ dc->setParameter(XMLUni::fgDOMErrorHandler,myErrorHandler);
// set feature if the serializer supports the feature/mode
static bool gSplitCdataSections = true;
- if(theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections))
- theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections);
+ if(dc->canSetParameter(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections))
+ dc->setParameter(XMLUni::fgDOMWRTSplitCdataSections, gSplitCdataSections);
static bool gDiscardDefaultContent = true;
- if(theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent))
- theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent);
+ if(dc->canSetParameter(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent))
+ dc->setParameter(XMLUni::fgDOMWRTDiscardDefaultContent, gDiscardDefaultContent);
static bool gFormatPrettyPrint = true;
- if(theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint))
- theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint);
+ if(dc->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint))
+ dc->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, gFormatPrettyPrint);
//
// Plug in a format target to receive the resultant
//((LocalFileFormatTarget*) myfFormTarget)->Target.setEscapeFlags();
- theSerializer->writeNode(mymFormTarget, *Document);
-
+ //kmr theSerializer->writeNode(mymFormTarget, *Document);
+ theSerializer->write(Document, theOutput);
+ delete theOutput;
delete theSerializer;
//