Hi There,
I have created a query that generates an XML file. But i also want to reference to a style sheet. I found in the forunm over here that i have to add this:
hSAXWriter:write-processing-instruction("xml-stylesheet", "type=""text/xsl"" href=""wo.xsl""").
but when i run it.
i receive this error:
WRITE-PROCESSING-INSTRUCTION method invalid while WRITE-STATUS is WRITE-IDLE.
(14609)
Can some help me? i'm pretty new to SAX-writer and the QAD documentation doesn't say anything about adding a stylesheet.
DEF VAR hSAXWriter AS HANDLE NO-UNDO.
DEF VAR lOK AS LOGICAL NO-UNDO.
CREATE SAX-WRITER hSAXWriter.
hSAXWriter:FORMATTED = TRUE.
hSAXWriter:ENCODING = "UTF-8".
hSAXWriter:strict = false.
cDEF VAR hSAXWriter AS HANDLE NO-UNDO.
DEF VAR lOK AS LOGICAL NO-UNDO.
CREATE SAX-WRITER hSAXWriter.
hSAXWriter:FORMATTED = TRUE.
hSAXWriter:ENCODING = "UTF-8".
hSAXWriter:strict = false.
hSAXWriter:write-processing-instruction("xml-stylesheet", "type=""text/xsl"" href=""wo.xsl""").
lOK = hSAXWriter:SET-OUTPUT-DESTINATION("file", "wo2-test.xml").
lOK = hSAXWriter:START-DOCUMENT().
lOK = hSAXWriter:START-ELEMENT("ProductionPlan").
lOK = hSAXWriter:SET-OUTPUT-DESTINATION("file", "wo2-test.xml").
lOK = hSAXWriter:START-DOCUMENT().
lOK = hSAXWriter:START-ELEMENT("ProductionPlan").
I have created a query that generates an XML file. But i also want to reference to a style sheet. I found in the forunm over here that i have to add this:
hSAXWriter:write-processing-instruction("xml-stylesheet", "type=""text/xsl"" href=""wo.xsl""").
but when i run it.
i receive this error:
WRITE-PROCESSING-INSTRUCTION method invalid while WRITE-STATUS is WRITE-IDLE.
(14609)
Can some help me? i'm pretty new to SAX-writer and the QAD documentation doesn't say anything about adding a stylesheet.
DEF VAR hSAXWriter AS HANDLE NO-UNDO.
DEF VAR lOK AS LOGICAL NO-UNDO.
CREATE SAX-WRITER hSAXWriter.
hSAXWriter:FORMATTED = TRUE.
hSAXWriter:ENCODING = "UTF-8".
hSAXWriter:strict = false.
cDEF VAR hSAXWriter AS HANDLE NO-UNDO.
DEF VAR lOK AS LOGICAL NO-UNDO.
CREATE SAX-WRITER hSAXWriter.
hSAXWriter:FORMATTED = TRUE.
hSAXWriter:ENCODING = "UTF-8".
hSAXWriter:strict = false.
hSAXWriter:write-processing-instruction("xml-stylesheet", "type=""text/xsl"" href=""wo.xsl""").
lOK = hSAXWriter:SET-OUTPUT-DESTINATION("file", "wo2-test.xml").
lOK = hSAXWriter:START-DOCUMENT().
lOK = hSAXWriter:START-ELEMENT("ProductionPlan").
lOK = hSAXWriter:SET-OUTPUT-DESTINATION("file", "wo2-test.xml").
lOK = hSAXWriter:START-DOCUMENT().
lOK = hSAXWriter:START-ELEMENT("ProductionPlan").