By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,938 Members | 2,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,938 IT Pros & Developers. It's quick & easy.

XSLT Brain Death has occured

P: n/a
I've been battling with this stupid problem for hours now.

WebApp:

Trying to do a simple transformation using XSLT to a Web Page, but it just
failes without an error message ( In other words, it bums out with a general
exeption with no message ).

It creates the Ouput.html, but errors and does not fill it with HTML.

Where am I going wrong ?

Cheers - OHM

//**********************************
//CODE
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(Server.MapPath("XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(xreader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(Server.MapPath("Output.html"), Nothing)

Try
oXSLT.Load(Server.MapPath("XDATA.XSLT"))
oXSLT.Transform(xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write("<B>FAILED - XSLT Exception </B" & ex.Message)
Catch ex As XsltCompileException
Response.Write("<B>FAILED: XLST Compilation Exception</B" &
ex.Message)
Catch ex As Exception
Response.Write("<B>FAILED: Unkown Exception - </B" & ex.Message)

Finally

xreader.Close()
xWriter.Close()
End Try
End Sub
//**************************************
// XML
<?xml version="1.0" encoding="utf-8" ?>
<bookstore xmlns="x-schmema:XDATA.xsd">

<book title="Wind In the Willows" author="Author Winkle"/>
<book title="Wind In the Bows" author="Martha Winkle"/>
<book title="Gale In the Willows" author="Susan Winkle"/>

</bookstore>

//****************************************
// XSD
<?xml version="1.0"?>
<xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="bookstore" msdata:IsDataSet="true" msdata:Locale="en-GB"
msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="book">
<xs:complexType>
<xs:attribute name="title" form="unqualified" type="xs:string"
/>
<xs:attribute name="author" form="unqualified" type="xs:string"
/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

//*********************************************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.xsd">
<xsl:template match="op:bookstore">
<HTML><BODY>
<TABLE>
<TR>
<TD><B>Title</B></TD>
<TD><B>Author</B></TD>
</TR>
<xsl:apply-templates select="op:book"/>
</TABLE>
</BODY></HTML>
</xsl:template>
<xsl:template match="op:book">
<TR>
<TR>
<TD><xsl:value-of select="op:title"/></TD>
</TR>
</TR>
</xsl:template>
</xsl:stylesheet>

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
Nov 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Dont worry guys, I'm making headway with this, not there yet but getting
close.
Cheers

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl...
I've been battling with this stupid problem for hours now.

WebApp:

Trying to do a simple transformation using XSLT to a Web Page, but it just
failes without an error message ( In other words, it bums out with a general exeption with no message ).

It creates the Ouput.html, but errors and does not fill it with HTML.

Where am I going wrong ?

Cheers - OHM

//**********************************
//CODE
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(Server.MapPath("XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(xreader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(Server.MapPath("Output.html"), Nothing)

Try
oXSLT.Load(Server.MapPath("XDATA.XSLT"))
oXSLT.Transform(xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write("<B>FAILED - XSLT Exception </B" & ex.Message)
Catch ex As XsltCompileException
Response.Write("<B>FAILED: XLST Compilation Exception</B" &
ex.Message)
Catch ex As Exception
Response.Write("<B>FAILED: Unkown Exception - </B" & ex.Message)
Finally

xreader.Close()
xWriter.Close()
End Try
End Sub
//**************************************
// XML
<?xml version="1.0" encoding="utf-8" ?>
<bookstore xmlns="x-schmema:XDATA.xsd">

<book title="Wind In the Willows" author="Author Winkle"/>
<book title="Wind In the Bows" author="Martha Winkle"/>
<book title="Gale In the Willows" author="Susan Winkle"/>

</bookstore>

//****************************************
// XSD
<?xml version="1.0"?>
<xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="bookstore" msdata:IsDataSet="true" msdata:Locale="en-GB" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="book">
<xs:complexType>
<xs:attribute name="title" form="unqualified" type="xs:string"
/>
<xs:attribute name="author" form="unqualified" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

//*********************************************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.xsd">
<xsl:template match="op:bookstore">
<HTML><BODY>
<TABLE>
<TR>
<TD><B>Title</B></TD>
<TD><B>Author</B></TD>
</TR>
<xsl:apply-templates select="op:book"/>
</TABLE>
</BODY></HTML>
</xsl:template>
<xsl:template match="op:book">
<TR>
<TR>
<TD><xsl:value-of select="op:title"/></TD>
</TR>
</TR>
</xsl:template>
</xsl:stylesheet>

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

Nov 20 '05 #2

P: n/a
If anyone is interested, normal brain functions resumed this AM and problems
were fixed.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:uk**************@TK2MSFTNGP10.phx.gbl...
Dont worry guys, I'm making headway with this, not there yet but getting
close.
Cheers

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:ea**************@TK2MSFTNGP10.phx.gbl...
I've been battling with this stupid problem for hours now.

WebApp:

Trying to do a simple transformation using XSLT to a Web Page, but it just failes without an error message ( In other words, it bums out with a

general
exeption with no message ).

It creates the Ouput.html, but errors and does not fill it with HTML.

Where am I going wrong ?

Cheers - OHM

//**********************************
//CODE
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(Server.MapPath("XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(xreader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(Server.MapPath("Output.html"), Nothing)

Try
oXSLT.Load(Server.MapPath("XDATA.XSLT"))
oXSLT.Transform(xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write("<B>FAILED - XSLT Exception </B" & ex.Message) Catch ex As XsltCompileException
Response.Write("<B>FAILED: XLST Compilation Exception</B" &
ex.Message)
Catch ex As Exception
Response.Write("<B>FAILED: Unkown Exception - </B" &

ex.Message)

Finally

xreader.Close()
xWriter.Close()
End Try
End Sub
//**************************************
// XML
<?xml version="1.0" encoding="utf-8" ?>
<bookstore xmlns="x-schmema:XDATA.xsd">

<book title="Wind In the Willows" author="Author Winkle"/>
<book title="Wind In the Bows" author="Martha Winkle"/>
<book title="Gale In the Willows" author="Susan Winkle"/>

</bookstore>

//****************************************
// XSD
<?xml version="1.0"?>
<xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="bookstore" msdata:IsDataSet="true"

msdata:Locale="en-GB"
msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="book">
<xs:complexType>
<xs:attribute name="title" form="unqualified" type="xs:string" />
<xs:attribute name="author" form="unqualified"

type="xs:string"
/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

//*********************************************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.xsd">
<xsl:template match="op:bookstore">
<HTML><BODY>
<TABLE>
<TR>
<TD><B>Title</B></TD>
<TD><B>Author</B></TD>
</TR>
<xsl:apply-templates select="op:book"/>
</TABLE>
</BODY></HTML>
</xsl:template>
<xsl:template match="op:book">
<TR>
<TR>
<TD><xsl:value-of select="op:title"/></TD>
</TR>
</TR>
</xsl:template>
</xsl:stylesheet>

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing


Nov 20 '05 #3

P: n/a
That was quick. One mention of XML or XSLT and my brain stays dead for a
week :P
____________________
Grim

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
If anyone is interested, normal brain functions resumed this AM and problems were fixed.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:uk**************@TK2MSFTNGP10.phx.gbl...
Dont worry guys, I'm making headway with this, not there yet but getting
close.
Cheers

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:ea**************@TK2MSFTNGP10.phx.gbl...
I've been battling with this stupid problem for hours now.

WebApp:

Trying to do a simple transformation using XSLT to a Web Page, but it just failes without an error message ( In other words, it bums out with a

general
exeption with no message ).

It creates the Ouput.html, but errors and does not fill it with HTML.

Where am I going wrong ?

Cheers - OHM

//**********************************
//CODE
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(Server.MapPath("XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(xreader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(Server.MapPath("Output.html"), Nothing)

Try
oXSLT.Load(Server.MapPath("XDATA.XSLT"))
oXSLT.Transform(xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write("<B>FAILED - XSLT Exception </B" & ex.Message) Catch ex As XsltCompileException
Response.Write("<B>FAILED: XLST Compilation Exception</B" & ex.Message)
Catch ex As Exception
Response.Write("<B>FAILED: Unkown Exception - </B" &

ex.Message)

Finally

xreader.Close()
xWriter.Close()
End Try
End Sub
//**************************************
// XML
<?xml version="1.0" encoding="utf-8" ?>
<bookstore xmlns="x-schmema:XDATA.xsd">

<book title="Wind In the Willows" author="Author Winkle"/>
<book title="Wind In the Bows" author="Martha Winkle"/>
<book title="Gale In the Willows" author="Susan Winkle"/>

</bookstore>

//****************************************
// XSD
<?xml version="1.0"?>
<xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="bookstore" msdata:IsDataSet="true"

msdata:Locale="en-GB"
msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="book">
<xs:complexType>
<xs:attribute name="title" form="unqualified" type="xs:string" />
<xs:attribute name="author" form="unqualified"

type="xs:string"
/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

//*********************************************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.xsd">
<xsl:template match="op:bookstore">
<HTML><BODY>
<TABLE>
<TR>
<TD><B>Title</B></TD>
<TD><B>Author</B></TD>
</TR>
<xsl:apply-templates select="op:book"/>
</TABLE>
</BODY></HTML>
</xsl:template>
<xsl:template match="op:book">
<TR>
<TR>
<TD><xsl:value-of select="op:title"/></TD>
</TR>
</TR>
</xsl:template>
</xsl:stylesheet>

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing



Nov 20 '05 #4

P: n/a
I must admit, I have found transformations a bit of a challenge

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@titan.btinternet.com...
That was quick. One mention of XML or XSLT and my brain stays dead for a
week :P
____________________
Grim

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
If anyone is interested, normal brain functions resumed this AM and problems
were fixed.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:uk**************@TK2MSFTNGP10.phx.gbl...
Dont worry guys, I'm making headway with this, not there yet but getting close.
Cheers

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:ea**************@TK2MSFTNGP10.phx.gbl...
> I've been battling with this stupid problem for hours now.
>
> WebApp:
>
> Trying to do a simple transformation using XSLT to a Web Page, but it
just
> failes without an error message ( In other words, it bums out with a
general
> exeption with no message ).
>
> It creates the Ouput.html, but errors and does not fill it with
HTML. >
> Where am I going wrong ?
>
> Cheers - OHM
>
> //**********************************
> //CODE
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> Dim xreader As New XmlTextReader(Server.MapPath("XDATA.XML")) > Dim xDoc As XPathDocument = New XPathDocument(xreader)
> Dim oXSLT As XslTransform = New XslTransform
> Dim xWriter As XmlTextWriter = New
> XmlTextWriter(Server.MapPath("Output.html"), Nothing)
>
> Try
> oXSLT.Load(Server.MapPath("XDATA.XSLT"))
> oXSLT.Transform(xDoc, Nothing, xWriter)
>
> Catch ex As XsltException
> Response.Write("<B>FAILED - XSLT Exception </B" &

ex.Message)
> Catch ex As XsltCompileException
> Response.Write("<B>FAILED: XLST Compilation

Exception</B" & > ex.Message)
> Catch ex As Exception
> Response.Write("<B>FAILED: Unkown Exception - </B" &
ex.Message)
>
> Finally
>
> xreader.Close()
> xWriter.Close()
> End Try
> End Sub
>
>
> //**************************************
> // XML
> <?xml version="1.0" encoding="utf-8" ?>
> <bookstore xmlns="x-schmema:XDATA.xsd">
>
> <book title="Wind In the Willows" author="Author Winkle"/>
> <book title="Wind In the Bows" author="Martha Winkle"/>
> <book title="Gale In the Willows" author="Susan Winkle"/>
>
> </bookstore>
>
> //****************************************
> // XSD
> <?xml version="1.0"?>
> <xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
> xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
> attributeFormDefault="qualified" elementFormDefault="qualified">
> <xs:element name="bookstore" msdata:IsDataSet="true"
msdata:Locale="en-GB"
> msdata:EnforceConstraints="False">
> <xs:complexType>
> <xs:choice maxOccurs="unbounded">
> <xs:element name="book">
> <xs:complexType>
> <xs:attribute name="title" form="unqualified"

type="xs:string"
> />
> <xs:attribute name="author" form="unqualified"
type="xs:string"
> />
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> //*********************************************
> // TRANSFORM
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsl:stylesheet version="1.0"
> xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
> xmlns:op="x-schemas:XDATA.xsd">
> <xsl:template match="op:bookstore">
> <HTML><BODY>
> <TABLE>
> <TR>
> <TD><B>Title</B></TD>
> <TD><B>Author</B></TD>
> </TR>
> <xsl:apply-templates select="op:book"/>
> </TABLE>
> </BODY></HTML>
> </xsl:template>
> <xsl:template match="op:book">
> <TR>
> <TR>
> <TD><xsl:value-of select="op:title"/></TD>
> </TR>
> </TR>
> </xsl:template>
> </xsl:stylesheet>
>
> --
>
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> Time flies when you don't know what you're doing
>
>



Nov 20 '05 #5

P: n/a
I will reply to that statement in approximately 7 days :S
___________
Grim
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:uu**************@TK2MSFTNGP09.phx.gbl...
I must admit, I have found transformations a bit of a challenge

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@titan.btinternet.com...
That was quick. One mention of XML or XSLT and my brain stays dead for a
week :P
____________________
Grim

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:%2****************@tk2msftngp13.phx.gbl...
If anyone is interested, normal brain functions resumed this AM and

problems
were fixed.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in

message
news:uk**************@TK2MSFTNGP10.phx.gbl...
> Dont worry guys, I'm making headway with this, not there yet but

getting > close.
>
>
> Cheers
>
> --
>
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> Time flies when you don't know what you're doing
>
> "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
> news:ea**************@TK2MSFTNGP10.phx.gbl...
> > I've been battling with this stupid problem for hours now.
> >
> > WebApp:
> >
> > Trying to do a simple transformation using XSLT to a Web Page, but it just
> > failes without an error message ( In other words, it bums out with a > general
> > exeption with no message ).
> >
> > It creates the Ouput.html, but errors and does not fill it with HTML. > >
> > Where am I going wrong ?
> >
> > Cheers - OHM
> >
> > //**********************************
> > //CODE
> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As > > System.EventArgs) Handles MyBase.Load
> > 'Put user code to initialize the page here
> > Dim xreader As New XmlTextReader(Server.MapPath("XDATA.XML")) > > Dim xDoc As XPathDocument = New XPathDocument(xreader)
> > Dim oXSLT As XslTransform = New XslTransform
> > Dim xWriter As XmlTextWriter = New
> > XmlTextWriter(Server.MapPath("Output.html"), Nothing)
> >
> > Try
> > oXSLT.Load(Server.MapPath("XDATA.XSLT"))
> > oXSLT.Transform(xDoc, Nothing, xWriter)
> >
> > Catch ex As XsltException
> > Response.Write("<B>FAILED - XSLT Exception </B" &
ex.Message)
> > Catch ex As XsltCompileException
> > Response.Write("<B>FAILED: XLST Compilation

Exception</B"
&
> > ex.Message)
> > Catch ex As Exception
> > Response.Write("<B>FAILED: Unkown Exception - </B" &
> ex.Message)
> >
> > Finally
> >
> > xreader.Close()
> > xWriter.Close()
> > End Try
> > End Sub
> >
> >
> > //**************************************
> > // XML
> > <?xml version="1.0" encoding="utf-8" ?>
> > <bookstore xmlns="x-schmema:XDATA.xsd">
> >
> > <book title="Wind In the Willows" author="Author Winkle"/>
> > <book title="Wind In the Bows" author="Martha Winkle"/>
> > <book title="Gale In the Willows" author="Susan Winkle"/>
> >
> > </bookstore>
> >
> > //****************************************
> > // XSD
> > <?xml version="1.0"?>
> > <xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
> > xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
> > attributeFormDefault="qualified" elementFormDefault="qualified">
> > <xs:element name="bookstore" msdata:IsDataSet="true"
> msdata:Locale="en-GB"
> > msdata:EnforceConstraints="False">
> > <xs:complexType>
> > <xs:choice maxOccurs="unbounded">
> > <xs:element name="book">
> > <xs:complexType>
> > <xs:attribute name="title" form="unqualified"
type="xs:string"
> > />
> > <xs:attribute name="author" form="unqualified"
> type="xs:string"
> > />
> > </xs:complexType>
> > </xs:element>
> > </xs:choice>
> > </xs:complexType>
> > </xs:element>
> > </xs:schema>
> >
> > //*********************************************
> > // TRANSFORM
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <xsl:stylesheet version="1.0"
> > xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
> > xmlns:op="x-schemas:XDATA.xsd">
> > <xsl:template match="op:bookstore">
> > <HTML><BODY>
> > <TABLE>
> > <TR>
> > <TD><B>Title</B></TD>
> > <TD><B>Author</B></TD>
> > </TR>
> > <xsl:apply-templates select="op:book"/>
> > </TABLE>
> > </BODY></HTML>
> > </xsl:template>
> > <xsl:template match="op:book">
> > <TR>
> > <TR>
> > <TD><xsl:value-of select="op:title"/></TD>
> > </TR>
> > </TR>
> > </xsl:template>
> > </xsl:stylesheet>
> >
> > --
> >
> > OHM ( Terry Burns )
> > . . . One-Handed-Man . . .
> >
> > Time flies when you don't know what you're doing
> >
> >
>
>



Nov 20 '05 #6

P: n/a
Does that mean you are looking at them as well ?

BTW, what does :S mean ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@sparta.btinternet.com...
I will reply to that statement in approximately 7 days :S
___________
Grim
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:uu**************@TK2MSFTNGP09.phx.gbl...
I must admit, I have found transformations a bit of a challenge

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@titan.btinternet.com...
That was quick. One mention of XML or XSLT and my brain stays dead for
a
week :P
____________________
Grim

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> If anyone is interested, normal brain functions resumed this AM and
problems
> were fixed.
>
> --
>
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> Time flies when you don't know what you're doing
>
> "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
> news:uk**************@TK2MSFTNGP10.phx.gbl...
> > Dont worry guys, I'm making headway with this, not there yet but

getting
> > close.
> >
> >
> > Cheers
> >
> > --
> >
> > OHM ( Terry Burns )
> > . . . One-Handed-Man . . .
> >
> > Time flies when you don't know what you're doing
> >
> > "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote
in > message
> > news:ea**************@TK2MSFTNGP10.phx.gbl...
> > > I've been battling with this stupid problem for hours now.
> > >
> > > WebApp:
> > >
> > > Trying to do a simple transformation using XSLT to a Web Page,
but it
> just
> > > failes without an error message ( In other words, it bums out

with a > > general
> > > exeption with no message ).
> > >
> > > It creates the Ouput.html, but errors and does not fill it with

HTML.
> > >
> > > Where am I going wrong ?
> > >
> > > Cheers - OHM
> > >
> > > //**********************************
> > > //CODE
> > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As > > > System.EventArgs) Handles MyBase.Load
> > > 'Put user code to initialize the page here
> > > Dim xreader As New

XmlTextReader(Server.MapPath("XDATA.XML"))
> > > Dim xDoc As XPathDocument = New XPathDocument(xreader)
> > > Dim oXSLT As XslTransform = New XslTransform
> > > Dim xWriter As XmlTextWriter = New
> > > XmlTextWriter(Server.MapPath("Output.html"), Nothing)
> > >
> > > Try
> > > oXSLT.Load(Server.MapPath("XDATA.XSLT"))
> > > oXSLT.Transform(xDoc, Nothing, xWriter)
> > >
> > > Catch ex As XsltException
> > > Response.Write("<B>FAILED - XSLT Exception </B" &
> ex.Message)
> > > Catch ex As XsltCompileException
> > > Response.Write("<B>FAILED: XLST Compilation

Exception</B"
&
> > > ex.Message)
> > > Catch ex As Exception
> > > Response.Write("<B>FAILED: Unkown Exception - </B" &
> > ex.Message)
> > >
> > > Finally
> > >
> > > xreader.Close()
> > > xWriter.Close()
> > > End Try
> > > End Sub
> > >
> > >
> > > //**************************************
> > > // XML
> > > <?xml version="1.0" encoding="utf-8" ?>
> > > <bookstore xmlns="x-schmema:XDATA.xsd">
> > >
> > > <book title="Wind In the Willows" author="Author Winkle"/>
> > > <book title="Wind In the Bows" author="Martha Winkle"/>
> > > <book title="Gale In the Willows" author="Susan Winkle"/>
> > >
> > > </bookstore>
> > >
> > > //****************************************
> > > // XSD
> > > <?xml version="1.0"?>
> > > <xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd"
> > > xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
> > > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
> > > attributeFormDefault="qualified" elementFormDefault="qualified">
> > > <xs:element name="bookstore" msdata:IsDataSet="true"
> > msdata:Locale="en-GB"
> > > msdata:EnforceConstraints="False">
> > > <xs:complexType>
> > > <xs:choice maxOccurs="unbounded">
> > > <xs:element name="book">
> > > <xs:complexType>
> > > <xs:attribute name="title" form="unqualified"
> type="xs:string"
> > > />
> > > <xs:attribute name="author" form="unqualified"
> > type="xs:string"
> > > />
> > > </xs:complexType>
> > > </xs:element>
> > > </xs:choice>
> > > </xs:complexType>
> > > </xs:element>
> > > </xs:schema>
> > >
> > > //*********************************************
> > > // TRANSFORM
> > > <?xml version="1.0" encoding="UTF-8" ?>
> > > <xsl:stylesheet version="1.0"
> > > xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
> > > xmlns:op="x-schemas:XDATA.xsd">
> > > <xsl:template match="op:bookstore">
> > > <HTML><BODY>
> > > <TABLE>
> > > <TR>
> > > <TD><B>Title</B></TD>
> > > <TD><B>Author</B></TD>
> > > </TR>
> > > <xsl:apply-templates select="op:book"/>
> > > </TABLE>
> > > </BODY></HTML>
> > > </xsl:template>
> > > <xsl:template match="op:book">
> > > <TR>
> > > <TR>
> > > <TD><xsl:value-of select="op:title"/></TD>
> > > </TR>
> > > </TR>
> > > </xsl:template>
> > > </xsl:stylesheet>
> > >
> > > --
> > >
> > > OHM ( Terry Burns )
> > > . . . One-Handed-Man . . .
> > >
> > > Time flies when you don't know what you're doing
> > >
> > >
> >
> >
>
>



Nov 20 '05 #7

P: n/a
No, it doesn't - sorry!! I'm busy trying to get data from a 64 pin I/O card
and cross-linked PLC :)

:S is an MSN Messenger smiley - it's a confused look. Wiggly mouth sort of
thing.
_____________________________
Grim

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
Does that mean you are looking at them as well ?

BTW, what does :S mean ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@sparta.btinternet.com...
I will reply to that statement in approximately 7 days :S
___________
Grim
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:uu**************@TK2MSFTNGP09.phx.gbl...
I must admit, I have found transformations a bit of a challenge

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"The Grim Reaper" <gr*********@btopenworld.com> wrote in message
news:cc**********@titan.btinternet.com...
> That was quick. One mention of XML or XSLT and my brain stays dead for
a
> week :P
> ____________________
> Grim
>
> "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
> news:%2****************@tk2msftngp13.phx.gbl...
> > If anyone is interested, normal brain functions resumed this AM and > problems
> > were fixed.
> >
> > --
> >
> > OHM ( Terry Burns )
> > . . . One-Handed-Man . . .
> >
> > Time flies when you don't know what you're doing
> >
> > "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in > message
> > news:uk**************@TK2MSFTNGP10.phx.gbl...
> > > Dont worry guys, I'm making headway with this, not there yet but
getting
> > > close.
> > >
> > >
> > > Cheers
> > >
> > > --
> > >
> > > OHM ( Terry Burns )
> > > . . . One-Handed-Man . . .
> > >
> > > Time flies when you don't know what you're doing
> > >
> > > "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in > > message
> > > news:ea**************@TK2MSFTNGP10.phx.gbl...
> > > > I've been battling with this stupid problem for hours now.
> > > >
> > > > WebApp:
> > > >
> > > > Trying to do a simple transformation using XSLT to a Web Page, but it
> > just
> > > > failes without an error message ( In other words, it bums out with
a
> > > general
> > > > exeption with no message ).
> > > >
> > > > It creates the Ouput.html, but errors and does not fill it

with HTML.
> > > >
> > > > Where am I going wrong ?
> > > >
> > > > Cheers - OHM
> > > >
> > > > //**********************************
> > > > //CODE
> > > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> > > > System.EventArgs) Handles MyBase.Load
> > > > 'Put user code to initialize the page here
> > > > Dim xreader As New
XmlTextReader(Server.MapPath("XDATA.XML"))
> > > > Dim xDoc As XPathDocument = New XPathDocument(xreader)
> > > > Dim oXSLT As XslTransform = New XslTransform
> > > > Dim xWriter As XmlTextWriter = New
> > > > XmlTextWriter(Server.MapPath("Output.html"), Nothing)
> > > >
> > > > Try
> > > > oXSLT.Load(Server.MapPath("XDATA.XSLT"))
> > > > oXSLT.Transform(xDoc, Nothing, xWriter)
> > > >
> > > > Catch ex As XsltException
> > > > Response.Write("<B>FAILED - XSLT Exception </B" &
> > ex.Message)
> > > > Catch ex As XsltCompileException
> > > > Response.Write("<B>FAILED: XLST Compilation
Exception</B"
> &
> > > > ex.Message)
> > > > Catch ex As Exception
> > > > Response.Write("<B>FAILED: Unkown Exception - </B"

& > > > ex.Message)
> > > >
> > > > Finally
> > > >
> > > > xreader.Close()
> > > > xWriter.Close()
> > > > End Try
> > > > End Sub
> > > >
> > > >
> > > > //**************************************
> > > > // XML
> > > > <?xml version="1.0" encoding="utf-8" ?>
> > > > <bookstore xmlns="x-schmema:XDATA.xsd">
> > > >
> > > > <book title="Wind In the Willows" author="Author Winkle"/>
> > > > <book title="Wind In the Bows" author="Martha Winkle"/>
> > > > <book title="Gale In the Willows" author="Susan Winkle"/>
> > > >
> > > > </bookstore>
> > > >
> > > > //****************************************
> > > > // XSD
> > > > <?xml version="1.0"?>
> > > > <xs:schema id="bookstore" targetNamespace="x-schmema:XDATA.xsd" > > > > xmlns:mstns="x-schmema:XDATA.xsd" xmlns="x-schmema:XDATA.xsd"
> > > > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > > xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
> > > > attributeFormDefault="qualified" elementFormDefault="qualified"> > > > > <xs:element name="bookstore" msdata:IsDataSet="true"
> > > msdata:Locale="en-GB"
> > > > msdata:EnforceConstraints="False">
> > > > <xs:complexType>
> > > > <xs:choice maxOccurs="unbounded">
> > > > <xs:element name="book">
> > > > <xs:complexType>
> > > > <xs:attribute name="title" form="unqualified"
> > type="xs:string"
> > > > />
> > > > <xs:attribute name="author" form="unqualified"
> > > type="xs:string"
> > > > />
> > > > </xs:complexType>
> > > > </xs:element>
> > > > </xs:choice>
> > > > </xs:complexType>
> > > > </xs:element>
> > > > </xs:schema>
> > > >
> > > > //*********************************************
> > > > // TRANSFORM
> > > > <?xml version="1.0" encoding="UTF-8" ?>
> > > > <xsl:stylesheet version="1.0"
> > > > xmlns=xsl:"http://www.w3.org/1999/XSL/Transform"
> > > > xmlns:op="x-schemas:XDATA.xsd">
> > > > <xsl:template match="op:bookstore">
> > > > <HTML><BODY>
> > > > <TABLE>
> > > > <TR>
> > > > <TD><B>Title</B></TD>
> > > > <TD><B>Author</B></TD>
> > > > </TR>
> > > > <xsl:apply-templates select="op:book"/>
> > > > </TABLE>
> > > > </BODY></HTML>
> > > > </xsl:template>
> > > > <xsl:template match="op:book">
> > > > <TR>
> > > > <TR>
> > > > <TD><xsl:value-of select="op:title"/></TD>
> > > > </TR>
> > > > </TR>
> > > > </xsl:template>
> > > > </xsl:stylesheet>
> > > >
> > > > --
> > > >
> > > > OHM ( Terry Burns )
> > > > . . . One-Handed-Man . . .
> > > >
> > > > Time flies when you don't know what you're doing
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.