473,466 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XSL transform trying to be smarter?

Hello,

I am using XSL to transform a XML file into a HTML output.
classic

so, I have a tag calling an image with a local path as

<img src="images/myimage.jpg"/>

nothing really strange here...

I am just surprised to see that the output includes the FULL path to
the image.
so, XSL first is able to figure out that my img tag is an html tag and
put in the full path there.

it makes for a HUGE src field, and since I am generating an output
with several images for each field, and hundreds of fields, it's just
slow.
i am thinking that all this extra text in the HTML just makes it
heavier to handle, and just wish to use the simpler local path.

Why is XSL generating the full path like this? How do I get around
this?

other thing i found out is that it keeps inserting attributes like:

xmlns:td="urn:schemas-microsoft-com:datatypes" all over the place in
my <div>

I tried to use <xsl:element name="div"instead of just <divbut it
didn't help.

any idea?

thanks for help!

Jul 24 '07 #1
3 1882
I'm printing the output in the browser into a TEXTAREA container. Note
that I'm using local file here.

I was doing this because as I dump the output in a div, the divs next
to it get moved around, which does not happen if I just dump text. I
thought the xsl output may be malformed, but it's fine, except for all
the added junk.

I'm not sure I am familiar enough with the namespace stuff.
what is xmlns:dt about? it shows up in the IMG tag

my 1st tag is already:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:dt="urn:schemas-microsoft-com:datatypes">

so why would it need to show up again? should I try version="2.0" ?
Jul 24 '07 #2
Joe Kesselman wrote:
>other thing i found out is that it keeps inserting attributes like:
xmlns:td="urn:schemas-microsoft-com:datatypes" all over the place in
my <div>
I forgot to add that you may also want to play with the
exclude-result-prefixes directive, if you're sure the prefix is not
being used in your output tree (including in text content such as
XPaths). See discussion at

http://www.w3.org/TR/xslt#literal-result-element

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jul 24 '07 #3
got it. thanks

what is dt for anyway? (I assume datatype) but what does it mean?

I guess I used the header from somewhere else and didn't realize this
was there.

when should i have to use the dt namespace?

Jul 24 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Barry Anderberg | last post by:
I have an XML document that I am trying to display in my ASP.NET page. I am using an XSL Transform to display repeating XML data in a specific format. It reads the data, and displays it on my...
2
by: John Lehmann | last post by:
I have an interesting problem. I am performing an XSL transform using the System.Xml.Xsl.Transform class. I have a database that contains the XSL style sheet string. And it seems to work pretty...
9
by: Patrick Guio | last post by:
Dear all, I am trying to use the std::transform algorithm to to the following vector< vector<char> >::iterator ik = keys.begin(); // key list iterator vector< vector<char> >::iterator is = ik;...
5
by: Dave | last post by:
Hi, I have this code that will write the transformed XML immediately to the browser with the Response object.. XslTransform trans = new XslTransform() trans.Load(MapPath("MyXsl.xsl"))...
3
by: Rouven Hertenstein | last post by:
Hi, I'm trying to test the vb.net-exercise "How to use a DataSet with the Office XP Chart Component and ASP.NET" on http://support.microsoft.com/kb/303016/en-us Visual Studio rails against the...
1
by: steve | last post by:
I am trying to create an XSLT Transform but keep getting the same problem. Overload resolution failed because no accessible 'Transform' can be called with these arguments. I create a reference...
1
by: Mike Hofer | last post by:
I've got two statements in my code that are both generating weird, weird, weird messages: The first one was, Dim document As System.Xml.XmlDocument Dim navigator As...
4
by: Dean Card | last post by:
Okay, so here is the situation. I have need to do some on-the-fly image creation. I have everything working great except for the last part of it, applying a perspective type transform to the...
6
by: Vijai Kalyan | last post by:
Hello, I am trying to use std::transform to take in a collection of strings, transform them and insert the result into an output container. So, I wrote something like this: std::wstring...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.