473,626 Members | 3,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLT Brain Death has occured

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.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(S erver.MapPath(" XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(x reader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)

Try
oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
oXSLT.Transform (xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write( "<B>FAILED - XSLT Exception </B" & ex.Message)
Catch ex As XsltCompileExce ption
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.x sd">

<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.x sd"
xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
<xs:element name="bookstore " msdata:IsDataSe t="true" msdata:Locale=" en-GB"
msdata:EnforceC onstraints="Fal se">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="book">
<xs:complexType >
<xs:attribute name="title" form="unqualifi ed" type="xs:string "
/>
<xs:attribute name="author" form="unqualifi ed" type="xs:string "
/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

//*************** *************** ***************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0"
xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.x sd">
<xsl:template match="op:books tore">
<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:valu e-of select="op:titl e"/></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
7 1278
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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(S erver.MapPath(" XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(x reader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)

Try
oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
oXSLT.Transform (xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write( "<B>FAILED - XSLT Exception </B" & ex.Message)
Catch ex As XsltCompileExce ption
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.x sd">

<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.x sd"
xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
<xs:element name="bookstore " msdata:IsDataSe t="true" msdata:Locale=" en-GB" msdata:EnforceC onstraints="Fal se">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="book">
<xs:complexType >
<xs:attribute name="title" form="unqualifi ed" type="xs:string "
/>
<xs:attribute name="author" form="unqualifi ed" type="xs:string " />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

//*************** *************** ***************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0"
xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.x sd">
<xsl:template match="op:books tore">
<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:valu e-of select="op:titl e"/></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
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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(S erver.MapPath(" XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(x reader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)

Try
oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
oXSLT.Transform (xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write( "<B>FAILED - XSLT Exception </B" & ex.Message) Catch ex As XsltCompileExce ption
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.x sd">

<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.x sd"
xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
<xs:element name="bookstore " msdata:IsDataSe t="true"

msdata:Locale=" en-GB"
msdata:EnforceC onstraints="Fal se">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="book">
<xs:complexType >
<xs:attribute name="title" form="unqualifi ed" type="xs:string " />
<xs:attribute name="author" form="unqualifi ed"

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

//*************** *************** ***************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0"
xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.x sd">
<xsl:template match="op:books tore">
<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:valu e-of select="op:titl e"/></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
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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim xreader As New XmlTextReader(S erver.MapPath(" XDATA.XML"))
Dim xDoc As XPathDocument = New XPathDocument(x reader)
Dim oXSLT As XslTransform = New XslTransform
Dim xWriter As XmlTextWriter = New
XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)

Try
oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
oXSLT.Transform (xDoc, Nothing, xWriter)

Catch ex As XsltException
Response.Write( "<B>FAILED - XSLT Exception </B" & ex.Message) Catch ex As XsltCompileExce ption
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.x sd">

<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.x sd"
xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
<xs:element name="bookstore " msdata:IsDataSe t="true"

msdata:Locale=" en-GB"
msdata:EnforceC onstraints="Fal se">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="book">
<xs:complexType >
<xs:attribute name="title" form="unqualifi ed" type="xs:string " />
<xs:attribute name="author" form="unqualifi ed"

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

//*************** *************** ***************
// TRANSFORM
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0"
xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
xmlns:op="x-schemas:XDATA.x sd">
<xsl:template match="op:books tore">
<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:valu e-of select="op:titl e"/></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
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*********@bt openworld.com> wrote in message
news:cc******** **@titan.btinte rnet.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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
> 'Put user code to initialize the page here
> Dim xreader As New XmlTextReader(S erver.MapPath(" XDATA.XML")) > Dim xDoc As XPathDocument = New XPathDocument(x reader)
> Dim oXSLT As XslTransform = New XslTransform
> Dim xWriter As XmlTextWriter = New
> XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)
>
> Try
> oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
> oXSLT.Transform (xDoc, Nothing, xWriter)
>
> Catch ex As XsltException
> Response.Write( "<B>FAILED - XSLT Exception </B" &

ex.Message)
> Catch ex As XsltCompileExce ption
> 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.x sd">
>
> <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.x sd"
> xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
> attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
> <xs:element name="bookstore " msdata:IsDataSe t="true"
msdata:Locale=" en-GB"
> msdata:EnforceC onstraints="Fal se">
> <xs:complexType >
> <xs:choice maxOccurs="unbo unded">
> <xs:element name="book">
> <xs:complexType >
> <xs:attribute name="title" form="unqualifi ed"

type="xs:string "
> />
> <xs:attribute name="author" form="unqualifi ed"
type="xs:string "
> />
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> //*************** *************** ***************
> // TRANSFORM
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsl:styleshe et version="1.0"
> xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
> xmlns:op="x-schemas:XDATA.x sd">
> <xsl:template match="op:books tore">
> <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:valu e-of select="op:titl e"/></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
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******** ******@TK2MSFTN GP09.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*********@bt openworld.com> wrote in message
news:cc******** **@titan.btinte rnet.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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
> > 'Put user code to initialize the page here
> > Dim xreader As New XmlTextReader(S erver.MapPath(" XDATA.XML")) > > Dim xDoc As XPathDocument = New XPathDocument(x reader)
> > Dim oXSLT As XslTransform = New XslTransform
> > Dim xWriter As XmlTextWriter = New
> > XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)
> >
> > Try
> > oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
> > oXSLT.Transform (xDoc, Nothing, xWriter)
> >
> > Catch ex As XsltException
> > Response.Write( "<B>FAILED - XSLT Exception </B" &
ex.Message)
> > Catch ex As XsltCompileExce ption
> > 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.x sd">
> >
> > <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.x sd"
> > xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
> > attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
> > <xs:element name="bookstore " msdata:IsDataSe t="true"
> msdata:Locale=" en-GB"
> > msdata:EnforceC onstraints="Fal se">
> > <xs:complexType >
> > <xs:choice maxOccurs="unbo unded">
> > <xs:element name="book">
> > <xs:complexType >
> > <xs:attribute name="title" form="unqualifi ed"
type="xs:string "
> > />
> > <xs:attribute name="author" form="unqualifi ed"
> type="xs:string "
> > />
> > </xs:complexType>
> > </xs:element>
> > </xs:choice>
> > </xs:complexType>
> > </xs:element>
> > </xs:schema>
> >
> > //*************** *************** ***************
> > // TRANSFORM
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <xsl:styleshe et version="1.0"
> > xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
> > xmlns:op="x-schemas:XDATA.x sd">
> > <xsl:template match="op:books tore">
> > <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:valu e-of select="op:titl e"/></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
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*********@bt openworld.com> wrote in message
news:cc******** **@sparta.btint ernet.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******** ******@TK2MSFTN GP09.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*********@bt openworld.com> wrote in message
news:cc******** **@titan.btinte rnet.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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
> > > 'Put user code to initialize the page here
> > > Dim xreader As New

XmlTextReader(S erver.MapPath(" XDATA.XML"))
> > > Dim xDoc As XPathDocument = New XPathDocument(x reader)
> > > Dim oXSLT As XslTransform = New XslTransform
> > > Dim xWriter As XmlTextWriter = New
> > > XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)
> > >
> > > Try
> > > oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
> > > oXSLT.Transform (xDoc, Nothing, xWriter)
> > >
> > > Catch ex As XsltException
> > > Response.Write( "<B>FAILED - XSLT Exception </B" &
> ex.Message)
> > > Catch ex As XsltCompileExce ption
> > > 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.x sd">
> > >
> > > <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.x sd"
> > > xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
> > > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
> > > attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
> > > <xs:element name="bookstore " msdata:IsDataSe t="true"
> > msdata:Locale=" en-GB"
> > > msdata:EnforceC onstraints="Fal se">
> > > <xs:complexType >
> > > <xs:choice maxOccurs="unbo unded">
> > > <xs:element name="book">
> > > <xs:complexType >
> > > <xs:attribute name="title" form="unqualifi ed"
> type="xs:string "
> > > />
> > > <xs:attribute name="author" form="unqualifi ed"
> > type="xs:string "
> > > />
> > > </xs:complexType>
> > > </xs:element>
> > > </xs:choice>
> > > </xs:complexType>
> > > </xs:element>
> > > </xs:schema>
> > >
> > > //*************** *************** ***************
> > > // TRANSFORM
> > > <?xml version="1.0" encoding="UTF-8" ?>
> > > <xsl:styleshe et version="1.0"
> > > xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
> > > xmlns:op="x-schemas:XDATA.x sd">
> > > <xsl:template match="op:books tore">
> > > <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:valu e-of select="op:titl e"/></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
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******** ******@TK2MSFTN GP12.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*********@bt openworld.com> wrote in message
news:cc******** **@sparta.btint ernet.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******** ******@TK2MSFTN GP09.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*********@bt openworld.com> wrote in message
news:cc******** **@titan.btinte rnet.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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP10.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.EventArg s) Handles MyBase.Load
> > > > 'Put user code to initialize the page here
> > > > Dim xreader As New
XmlTextReader(S erver.MapPath(" XDATA.XML"))
> > > > Dim xDoc As XPathDocument = New XPathDocument(x reader)
> > > > Dim oXSLT As XslTransform = New XslTransform
> > > > Dim xWriter As XmlTextWriter = New
> > > > XmlTextWriter(S erver.MapPath(" Output.html"), Nothing)
> > > >
> > > > Try
> > > > oXSLT.Load(Serv er.MapPath("XDA TA.XSLT"))
> > > > oXSLT.Transform (xDoc, Nothing, xWriter)
> > > >
> > > > Catch ex As XsltException
> > > > Response.Write( "<B>FAILED - XSLT Exception </B" &
> > ex.Message)
> > > > Catch ex As XsltCompileExce ption
> > > > 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.x sd">
> > > >
> > > > <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.x sd" > > > > xmlns:mstns="x-schmema:XDATA.x sd" xmlns="x-schmema:XDATA.x sd"
> > > > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > > > xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
> > > > attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" > > > > > <xs:element name="bookstore " msdata:IsDataSe t="true"
> > > msdata:Locale=" en-GB"
> > > > msdata:EnforceC onstraints="Fal se">
> > > > <xs:complexType >
> > > > <xs:choice maxOccurs="unbo unded">
> > > > <xs:element name="book">
> > > > <xs:complexType >
> > > > <xs:attribute name="title" form="unqualifi ed"
> > type="xs:string "
> > > > />
> > > > <xs:attribute name="author" form="unqualifi ed"
> > > type="xs:string "
> > > > />
> > > > </xs:complexType>
> > > > </xs:element>
> > > > </xs:choice>
> > > > </xs:complexType>
> > > > </xs:element>
> > > > </xs:schema>
> > > >
> > > > //*************** *************** ***************
> > > > // TRANSFORM
> > > > <?xml version="1.0" encoding="UTF-8" ?>
> > > > <xsl:styleshe et version="1.0"
> > > > xmlns=xsl:"http ://www.w3.org/1999/XSL/Transform"
> > > > xmlns:op="x-schemas:XDATA.x sd">
> > > > <xsl:template match="op:books tore">
> > > > <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:valu e-of select="op:titl e"/></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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1631
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 XML file even though I am just processing a stylesheet. So as you can see in my code I reference a valid xml file named continents.xml- even though the xsl styleheet does not NEED it! Is there different syntax for doing this so I don't need the reference to continents.xml????
5
4810
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 stylesheet, "foo.xsl". Foo relies on several parameters that all contain the names of various XML tags. Foo.xsl then performs a standard action (outputting the information in HTML) on the tag given by the parameter.
3
1626
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 generated by the Java code and some of the static labels across the stylesheets are the same. Ideally I'd like to import a set of variables into each template, and preferably based on an XSLT parameter (the locale) but this obviously doesn't work:
1
1870
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. This skinning could be extensive (entire change to the UI appearance) or more minimal with a measure of personalization such as the adding of links to a navigational menu option. I've done something similar to this in the past by putting all the appropriate data into a database table, but...
3
1098
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 have a very simple example where price is a float, and I put a text value in its place to test validation. "Nothing Is Reported", however, when I use the IDE to validate it, it complains as expected. Where have I gone wrong ? '// THIS IS MY PUNY LITTLE XML FILE '// <?xml version="1.0"...
3
1744
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? Thanks!
10
2310
by: olivier.scalbert | last post by:
Hello, the following constraints: source: <Source> <Item>AAA</Item> <Item>BBBBBBBBBBB</Item> <Item>CCCCCCCCC</Item> <Item>DDDDDDDDDDDDDDD</Item>
1
2376
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 xsl = new StreamSource(xslFile); StreamResult out = new StreamResult(outputFile); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(xsl); transformer.transform(xml, out);
2
9141
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> <item> <assignee username="srinivas.rachakonda">Srinivas Rachakonda</assignee>
0
8205
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8713
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8644
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8514
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7206
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4208
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2632
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1516
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.