stylesheet. I could post it here, but it is rather long and may not be of
"Webbert" <webbertsolutions@hotmail.com.REMOVE.THIS> wrote in message
news:2CC30271-7FAE-4198-96DD-B3091948BCAE@microsoft.com...
>I change the match from
> <xsl:template match="@*|@xmlns:*|@xmlns|@xml:*|@dt:*|@d2:*" > <!--
> xml:space="preserve" -->
> to
> <xsl:template match="@*" > <!-- xml:space="preserve" -->
>
> and similar xsl:apply-templates from
> <xsl:apply-templates select="@*|@xmlns:*|@xmlns|@xml:*|@dt:*|@d2:*"/>
> <SPAN class="m">></SPAN></DIV>
> to
> <xsl:apply-templates select="@*"/> <SPAN class="m">></SPAN></DIV>
>
>
> I added enable scripting for the transformer as well do to an execption
> being generated.
> XsltSettings xsltSettings = new XsltSettings( true, true );
>
> XslCompiledTransform xslt = new XslCompiledTransform();
> xslt.Load( @"..\..\Template\myDefaultss80.xsl", xsltSettings, null );
> xslt.Transform( @"..\..\Data\authors.xml", @"..\..\Data\output.html" );
>
> and I get an exception in this code
> <msxsl:script implements-prefix="vxpathuser">
> <![CDATA[
> function xml(node)
> {
> return node(0).xml; //now();
> }
>
>
> An exception of type 'Microsoft.JScript.JScriptException' occurred in
> Microsoft.JScript.dll but was not handled in user code. Additional
> information: Error in the application.
>
> JScriptException
> ----------------
> Function expected
>
>
> If I comment out the return statement everything works although I get no
> data for the node
>
> <authors xmlns:user="mynamespace">
> <author>
> <name idd="VH"></name>
> <user2:name idd="VH"></user2:name>
> <nationality></nationality>
> </author>
>
>
> If I remove all instances of vxpathuser:xml() from the following
> <SPAN id="Selected" class="se"> <xsl:value-of
> select="vxpathuser:xml(.)"/></SPAN>
> to
> <SPAN id="Selected" class="se"> <xsl:value-of select="."/></SPAN>
>
> I get all the data but extra blank lines in the output.
>
> I have been unable to find any information on vxpathuser:xml().
> I would imagine that the problem I am experiencing has something to do
> with
> my machine, but am unsure.
>
>
> Machine Information
> ==========================
> Windows XP SP2
> MS IE v6.0.2900.2180.xpsp_sp2_gdr.050301-1519
> MSXML 6.0 Parser v6.00.3883.8
>
>
>
> Any thoughts are appreciated.
> Dave
>
> =================================
>
>
> "Dimitre Novatchev" wrote:
>
>> Dave,
>> Thank you for the observed problem.
>>
>> The fact is that this stylesheet was converted from the original non-XSLT
>> stylesheet used by IE.
>>
>> It is very old and is accepted by MSXML3 (used by IE) and MSXML4.
>>
>> The necessary corrections are:
>>
>> 1.
>>
>> In
>> <xsl:template match="@*|@xmlns:*|@xmlns|@xml:*|@dt:*|@d2:*">
>>
>> remove all "attributes" after the first:
>>
>> <xsl:template match="@*">
>>
>>
>> 2. For all <xsl-apply-templates> (there are 5-6 such) with a select
>> attribute that contains similar "ayttributes:, remove them.
>>
>>
>> One could use the stylesheet of the XPath Visualizer for Mozilla, which
>> does
>> not contain such expressions.
>>
>> Cheers,
>> Dimitre Novatchev
>>
>> "Webbert" <webbertsolutions@hotmail.com.REMOVE.THIS> wrote in message
>> news:30821DEC-EF1D-4BF4-8FF4-6DA6F7D10B0D@microsoft.com...
>> > Dimitre,
>> >
>> > I pulled down the Visualizer and experienced some problems. As a note
>> > to
>> > the
>> > Readme, you might want to include that if you are experiencing issues
>> > with
>> > XML files other than the ones that you provide, that they should check
>> > the
>> > property of your files. If any of the files say "unblock" then they
>> > should.
>> > This will fix the problem. Took me a while to figure this out.
>> >
>> > On to the question...
>> > If I load your Authors.xml and myDefaultss80.xml file into XML Spy and
>> > try
>> > to transform, I get an error on
>> > Line 323: <xsl:template match="@*|@xmlns:*|@xmlns|@xml:*|@dt:*|@d2:*">
>> > Invalid prefixError in XPath expression, Invalid prefix
>> >
>> > If I try to transform using .NET and the following code
>> >
>> > XslCompiledTransform xslt = new XslCompiledTransform();
>> > xslt.Load( @"..\..\myDefaultss80.xsl" );
>> > xslt.Transform( @"..\..\input.xml", @"..\..\authors.xml" );
>> >
>> > an Exception is thrown, "Prefix 'xmlns' is not defined."
>> >
>> > Any thoughts are appreciated.
>> >
>> > Thanks,
>> > Dave
>> >
>> >
>> > "Dimitre Novatchev" wrote:
>> >
>> >> > Unfortunately I don't think it is possible to get IE or the
>> >> > WebBrowser
>> >> > control to do that if you have a string with markup.
>> >>
>> >> Proven possible -- see the code of the XPath Visualizer for details.
>> >>
>> >> Another remark: defaultss.xsl is not written in XSLT, as we well know.
>> >>
>> >> Cheers,
>> >> Dimitre Novatchev
>> >>
>> >>
>> >> "Martin Honnen" <mahotrash@yahoo.de> wrote in message
>> >> news:eNV3DMl4GHA.696@TK2MSFTNGP06.phx.gbl...
>> >> >
>> >> >
>> >> > Webbert wrote:
>> >> >
>> >> >> I am trying to display XML in a WebBrowser Control. I receive a
>> >> >> data
>> >> >> feed of XML and am trying to inject it into the control. I have
>> >> >> not
>> >> >> been
>> >> >> successful in doing so. The only solution I have found is to write
>> >> >> it
>> >> >> to
>> >> >> a temp file and then use the Navigate method to load it. As the
>> >> >> control
>> >> >> is capable of loading it from disk, I would like to find a way to
>> >> >> skip
>> >> >> the save/load and just inject.
>> >> >
>> >> > What kind of "XML display" are you looking for? That collapsible
>> >> > pretty
>> >> > print of the XML source tree that you get when you load an XML
>> >> > document
>> >> > in
>> >> > an IE browser window? That is done with an XSL stylesheet that IE
>> >> > applies
>> >> > using MSXML. Unfortunately I don't think it is possible to get IE or
>> >> > the
>> >> > WebBrowser control to do that if you have a string with markup. What
>> >> > you
>> >> > could do in a .NET 2.0 application however is to run the XSLT
>> >> > transformation with .NET to transform the XML to HTML and then set
>> >> > the
>> >> > DocumentText property of the control.
>> >> >
>> >> > --
>> >> >
>> >> > Martin Honnen --- MVP XML
>> >> >
http://JavaScript.FAQTs.com/ >> >>
>> >>
>> >>
>>
>>
>>