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 7 1195
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
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
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
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 > >
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 > > > > > >
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 > > > > > > > > > > > >
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 > > > > > > > > > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Thomas Miller |
last post by:
Here is my code that works fine. I am wondering if there is a better
way to do this. In my xslt transformation it seems I
HAVE to reference an...
|
by: Brandolon Hill |
last post by:
Hi,
Is there a way to check and see if a parameter is defined in XSLT?
I have many stylesheets that all have an <xsl:include> of the same...
|
by: Darren Davison |
last post by:
Hi,
I have a documentation tool based on Java and XSLT that I want to add i18n
capability to. There are around 8 stylesheets that process a Source...
|
by: Ric Castagna |
last post by:
Greetings from Snowy Charlotte...
I am trying to create a dynamic web site that will be "skinned" based
upon an authenticated user's information....
|
by: One Handed Man \( OHM - Terry Burns \) |
last post by:
Yes, my brain is once again dead ( this is my mind writing using a
supernatural force ).
I'm trying to validate an xml file against its schema, I...
|
by: Carles Company Soler |
last post by:
Hello,
I want to calculate the value of an attribute. For example <rect x="2+3"
y="12"and be <rect x="5" y="12">. Is it possible using XSLT?
...
|
by: olivier.scalbert |
last post by:
Hello,
the following constraints:
source:
<Source>
<Item>AAA</Item>
<Item>BBBBBBBBBBB</Item>
<Item>CCCCCCCCC</Item>...
|
by: killy971 |
last post by:
I am using the following syntax, with Xalan, to process xml
transformations in java:
StreamSource xml = new StreamSource(xmlFile);
StreamSource...
|
by: saritha2008 |
last post by:
Hi,
As part of transforming one form of xml to another form, i need to do the below mentioned transformation:
My Input XML:
<rss>
<channel>...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
| |