XSL Displaying Problem

This is a discussion on "XSL Displaying Problem" within the Other Programming Languages section. This forum, and the thread "XSL Displaying Problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 23rd, 2005, 01:20
Junior Member
Join Date: Nov 2005
Age: 28
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
XSL Displaying Problem

Hi every body, i have a problem to display the XML node value in XSL file, can any body please help me to solve the problem?

There are some description here:
Actually, i'm doing a web application using asp, vb, MS Server 2000, xml, xpath, xsl. From asp i form a XML request string and send it to vb. After vb process the data and return the expexted value in a XML response string. One of the node in the XML response string is <MessageContent> which is retrieved from the database and the content consist of carriage return and line feed characters.
In vb, i declare a string variable to store the value first, then i assign the string to the XML node, like belows:
Code: Select all
 
Dim objDOM as DOMDocument40
Dim nodeMessageContent As IXMLDOMElement
Dim strContent As String
:
Set nodeMessageContent = objDOM.CreateElement("MessageContent")
nodeMessageContent.Text = strContent
When i debug the code and print the value of nodeMessageContent(nodeMessageContent.nodeTypedVal ue), i'm aware that the carriage return and the line feed characters has been omitted, the returned value is "Hello, every body this is a XSL displaying problem can someone please help me?" This is not my original message, you can see the original string at XML file below. As i know that this is the XML normal practices, not a error. So to solve my problem that to remain the carriage return and line feed characters, i'm decided to use this method:
Code: Select all
:
Dim abytContent() As Byte
:
abytContent = strContent 
Set nodeMessageContent = objDOM.createNode("element", _
"MessageContent", "")
nodeMessageContent.dataType = "bin.base64"
nodeMessageContent.nodeTypedValue = abytContent
This is work. Now the value in the node contains the carriage return and line feed characters. This node then append to a parent node and form a XML response string that consists of a few number of node.
When this XML string return back to the asp, asp will process the output in a XSL file, the schema i define with that specific node is like below:
Schema:
Code: Select all
:
<xs:element name="MessageContent">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:anyAttribute namespace="##any" processContents="skip"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
:
In XSL file, when i retrieve the value of the tag, "MessageContent", it's not work. The method i use is:
XSL:
Code: Select all
:
<TABLE><TR><TD>
<SPAN>
<xsl:attribute name="class">msgContent</xsl:attribute>
<xsl:value-of select="//MessageContent"/>
</SPAN>
</TABLE></TR></TD>
:
XML File:
Code: Select all
:
<MessageContent>
Hello, every body
this is a XSL displaying problem
 
can someone please help me?
</MessageContent>
:
Actually, there is a HTML tags in the message, the original message is:
Code: Select all
 
<Font color="#FF0000">Hello, every body</Font>
this is a XSL displaying problem
 
<B>can someone please help me?</B>
My expected output is the message content which in the red and bold text.

Anyone please help me.
Thanks a lot

Last edited by ivan; Nov 24th, 2005 at 23:50.
Reply With Quote

Reply

Tags
xsl, displaying, problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Problem displaying all my streaming videos buckmajor Flash & Multimedia Forum 8 Dec 20th, 2007 10:17
problem with blog displaying images remo PHP Forum 3 Nov 24th, 2006 12:00
Odd input field not displaying problem hankhill Classic ASP 1 Jun 26th, 2006 23:11
Displaying Base64Binary to string problem ivan Other Programming Languages 0 Feb 7th, 2006 03:30
mysql_fetch_array - problem displaying results jswebdev PHP Forum 4 Oct 15th, 2005 17:01


All times are GMT. The time now is 02:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43