You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by st...@inwind.it on 2000/02/14 15:24:18 UTC
Xalan and Mozilla
Hi,
I'm working on the Mozilla's source code, I would insert Xalan and
Xerces (C++ implementation).
I have written a function, in a VC6 project, that uses
XSLTEngineImpl::process(&XMLSource, &XSLSource, OutputFile) to apply a
XSL stylesheet to an xml file. This program works correctly.
Now, I have inserted this function in the Mozilla source code, but it
doesn't work: the output file is empty. I have compiled the code using
nmake. I used the option -Ic:\Xalan\src -Ic:\Xerces-C-src_1_0_1\src and
I have linked all the library that I found in Xalan\bin.
Why the function I wrote doesn't work when it's compiled with the source
code of Mozilla?
I have also another problem. I would apply one or more XSL stylesheet to
an xml file using XSLTEngineImpl::process(&XMLSource, null, OutputFile).
How should I write the xml-stylesheet processing instruction in the xml
file?
I try using <?xml-stylesheet type="text/xsl" href="file:///c:/foo.xsl"
?> but the output file is empty. Why?
Thanks,
Simona
Re: Xalan and Mozilla
Posted by Pierpaolo Fumagalli <pi...@apache.org>.
staximo@inwind.it wrote:
>
> I have also another problem. I would apply one or more XSL stylesheet to
> an xml file using XSLTEngineImpl::process(&XMLSource, null, OutputFile).
> How should I write the xml-stylesheet processing instruction in the xml
> file?
> I try using <?xml-stylesheet type="text/xsl" href="file:///c:/foo.xsl"
> ?> but the output file is empty. Why?
I believe it's because the first XSL pass reads the fist
<?xml-stylesheet ... ?>
processing instruction, and applies the styleseet, while removing the
second one...
Try adding to your first stylesheet something like:
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
This should copy the PI in the result of the first pass, then call
the processor once again using as source the result of the first
processing...
Pier
--
--------------------------------------------------------------------
- P I E R -
stable structure erected over water to allow the docking of seacraft
<ma...@betaversion.org> <http://www.betaversion.org/~pier/>
--------------------------------------------------------------------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------
RE: Xalan and Mozilla
Posted by Linda Derezinski <li...@sclrules.com>.
I have been fighting the same problems. It seems that I haven't been able
to get the versions of xalan and xerces to compile against.
_______________________________________________________________
Linda Derezinski
Interface & Control Systems
-----Original Message-----
From: staximo@inwind.it [mailto:staximo@inwind.it]
Sent: Monday, February 14, 2000 9:24 AM
To: xalan-dev@xml.apache.org
Subject: Xalan and Mozilla
Hi,
I'm working on the Mozilla's source code, I would insert Xalan and
Xerces (C++ implementation).
I have written a function, in a VC6 project, that uses
XSLTEngineImpl::process(&XMLSource, &XSLSource, OutputFile) to apply a
XSL stylesheet to an xml file. This program works correctly.
Now, I have inserted this function in the Mozilla source code, but it
doesn't work: the output file is empty. I have compiled the code using
nmake. I used the option -Ic:\Xalan\src -Ic:\Xerces-C-src_1_0_1\src and
I have linked all the library that I found in Xalan\bin.
Why the function I wrote doesn't work when it's compiled with the source
code of Mozilla?
I have also another problem. I would apply one or more XSL stylesheet to
an xml file using XSLTEngineImpl::process(&XMLSource, null, OutputFile).
How should I write the xml-stylesheet processing instruction in the xml
file?
I try using <?xml-stylesheet type="text/xsl" href="file:///c:/foo.xsl"
?> but the output file is empty. Why?
Thanks,
Simona