|
In the dean.edwards blog, he is using a server-based script and javascript to "correct" the base64 data to display in IE6. He presents some different approaches to solve the problem.
|
|
|
|
|
Hi Mike & Jackson,
I'm really sorry for giving an invalid image data. Now I got the stuff using XSL. This is how I did. The XML file(say, img.xml) contains the image data inline.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="img.xsl"?>
<MusicDirectors>
<musician>
<name>A R Rahman</name>
<country>India</country>
<photo>data:image/gif;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsHCAkIBwsJCQkMCwsNEBoREA8PECAXGBMaJiIo
KCYiJSQqMD0zKi05LiQlNUg1OT9BREVEKTNLUEpCTz1DREH/2wBDAQsMDBAOEB8RER9BLCUs
QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUH/wAAR
CABpAEkDASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgABBAUHAggD/8QARRAAAQMD
AgQCBQULDQEAAAAAAQIDEQAEBRIhBjFBURNxBxQiYYEVkaGx0RYXI0JSVGJyk6LhMjQ1Q1N0
gpKUs8HS8dP/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
AAwDAQACEQMRAD8A1ylSqHl71OPxtzeLgBlpS9+4Gw+Jigr87xfgsBqTkMg0h4CfAQdbh/wj
f54rIuN/SLecSJVYWLa7PHE+0kn8I9+tHIfo/PNC2cuLi4ydz6w4pakvu/yomSskzG0zP/kV
GtmVOrGlQSek0EpCrZu3Hit6yv8AIWUqPxIIqMkkJUEJ9k7z1TG9dXK9RSCrxClOmeQ+Fd4l
t53IMIt0Fb2uUoBIKyN9O3eI+NBHPtJHLzo14D9IFzw4hGPukG4sC5I9qCyDzjblO8efehO8
adt3EuOLaUdUo8Mggx1A7T1iD0mvgnQdlJIlUyTMCg9UMOIeZQ62ZQtIUk9weVdUBeh7iJWV
wq8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vOoMtslMqWZiRCm1md
hs2BJM5dv1MmtYzn9AcQf3Vr/ecrJ+goOhypUw5UqB6ee9c09AqalSoP/9k=</photo>
</musician>
</MusicDirectors>
And here is the XSL file(img.xsl)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" />
<xsl:template match="MusicDirectors">
<html>
<body>
<font face="verdana" size="1">
<table>
<xsl:for-each select="musician">
<TR> <TD rowspan="7"> <img src="{photo}" width="75" height="75"/> </TD> </TR>
<TR> <TD height="5"> Name : </TD> <TD> <xsl:value-of select="name"/> </TD> </TR>
<TR> <TD height="5"> Country : </TD> <TD> <xsl:value-of select="country"/> </TD> </TR>
</xsl:for-each>
</table>
</font>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Now I'd like to use the same stuff for INLINE AUDIO/VIDEO data, so that the entire information would be in a single XML file.
Since IE is not supporting this Base64 encoding, I need to know how to make this IE compliant. I hope it's possible by means of Java Script. But I haven't worked on Java Script. If you have any idea, kindly share with me and let me know the importance of Embedding Inline Binary data in XML.
Sarvan AL
|
|
|
|
|
I encoded a .wmv file in to base64 format and placed as a tag in XML.
Is there any way to play that encoded video file in the browser's embeded player( any player ) ?
Which player is encoded video compatible ?
I used base64 encoding for jpg file. it is working properly. i can view the encoded jpg file in the browser. In the same way is there any possbility to play the encoded video file in the browser ?
Which encoding is optimal for video ?
What is the role of CODEC in video encoding ?
Karthik M
|
|
|
|
|
No. You can't really do that. All you havwe done is ASCII encoded the binary data and potentially added a massive overhead to the processing. You cant just past such an encoded object to a video player and it can work out what to do with it. I personally would never encode video data into base64 and then embedd it in XML. That is asking for trouble.
|
|
|
|
|
Can anybody help in getting the node name and node value from a XML to two arrays
that is nodename in one array and node value in another array. even if there is no value for a particular node then also the array of the nodename should be there in one array and the other array should be empty.
Vipin
|
|
|
|
|
Vipin Venugopal wrote: to two arrays
Arrays of what?
In what language?
On what platform?
led mike
|
|
|
|
|
If its C# you are working in, then just deserialise the XML document into a standard POCO (Plain old CLR object) and then run a loop on it to take all the data you want out and place it into an Array (or Generic List).
|
|
|
|
|
Hi All,
We need any tool/any code suggestion that can generate report of around 6lacs (or More) pages and the format of the report will be of letter.
Currently we are working with xml and xslt but we want some good replacement of this as our client dont want xml and xslt.
Information:
View : Web Based
Database : Oracle 10G
Front End Technology : ASP.NET and ASP
Note: Crystal Report is also not performaing well in this case.
Suggested Solution must provide:
1) Faster Report Generation
2) Flexible Formating options
3) Export and Import of repots for other popular formats
Any one please help.
HV
|
|
|
|
|
hiraljv wrote: 6lacs (or More) pages
what is "6lacs"?
hiraljv wrote: as our client dont want xml and xslt.
Then let the client do it themselves thier own way. If they want you to do it they don't tell you "how" to do it.
hiraljv wrote: 1) Faster Report Generation
Faster than what?
hiraljv wrote: 3) Export and Import of repots for other popular formats
Import a report? Never heard of that, normally you import the "data" used in the report, you don't import the report.
led mike
|
|
|
|
|
can attributes be null??????
|
|
|
|
|
not exactly if you will have like this
<rizwan att1="hello">
and
<rizwan>
then on accessing Second attribute you will get ("") blank stirng.
|
|
|
|
|
|
not exactly if you will have like this
<Rizwan att1="hello">
and
<Rizwan>
then on accessing Second attribute you will get ("") blank stirng.
Rizwan Bashir
ALM Soft[^]
|
|
|
|
|
can u make it more clear please
|
|
|
|
|
I have an existing application I'm trying to support, and am having some troubles. I'm not too familiar with XML/XSL. Here's the situation.
I am trying to put a value from a querystring into a hidden form element using xsl. where the url is object.asp?candidateID=285
there is an asp file that looks like it creates the xml file. Inside that file there is this code:
for each item in request.queryString
proc.addParameter cstr(item), cstr(request.queryString(item))
next
I'm assuming this creates an xml object somewhere that I can reference.
Inside my xsl file I am trying to reference it this way:
But it is not returning a value.
Any help on this would be greatly appreciated. It's driving me nuts...
|
|
|
|
|
The XSL is not going to be able to read that. You should try something like:
<input type="hidden" name="candidateID">
<xsl:attribute name="value">
<xsl:value-of select="@candidateID" />
</xsl:attribute>
</input>
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
When I view the source this is al I get.
So for some reason it's not picking up the value from the url.
|
|
|
|
|
Well, it's selecting @candidateID . That would have to be an attribute of the current node. I have no idea what the current node is when this code is run. You really just have to check the code before it to see where the XSL processor is in regards to the XML file. If you need help, you can always post more of your XSL and a sample of the XML you're parsing.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
the xml looks like this:
- <survey id="DFSCRFKPY5dAM4UJAIP1" style="/adeptiv/survey/assets/templates/none.xsl">
<name>Test2
<description>
- <questions>
<question id="a3eDT0NR7ZcYYKRNQ05d" type="field" number="1" depth="1" required="false" value="How old are you" answer="">
- <question id="FNDL0YhGVg5aK3PZdOb6" type="pulldown" number="2" depth="1" required="false" value="Where do you live" answer="">
PA
VT
- <question id="X2M7aO1D4b1RMcSXWQB4" type="radio" number="3" depth="1" required="false" value="how important is Apple Pie?" answer="">
1
2
3
4
5
So I don't even see the candidateID in there.
The xml is being generated by and asp page. which contains this code:
set selection = xmlDoc.selectSingleNode(path)
if typename(selection) <> "Nothing" then
style = selection.text
set xslDoc = load(style)
xsltDoc.stylesheet = xslDoc
set proc = xsltDoc.createProcessor()
proc.input = xmlDoc
for each item in request.queryString
proc.addParameter cstr(item), cstr(request.queryString(item))
next
for each item in request.form
proc.addParameter cstr(item), cstr(request.form(item))
next
for each item in request.serverVariables
proc.addParameter cstr(lcase(item)), cstr(request.serverVariables(item))
next
I was thinking because it looks like it loops through the query string, it should be creating something in the xml that I could reference. I just don't see it.
Thanks so much for looking at this!
|
|
|
|
|
I can't quite see all your XML. Did you use the check box to ignore html tags? Anyways, if candidateID is not an attribute in there, then it certainly won't show up in your input tag. But, what you're looking at with proc.addParameter is that a parameter is being passed into the XSL for processing. Up at the top of the XSL should be a xsl:param tag for candidateID if that is indeed one of the items in the querystring or form. To access it use $candidateID instead of @candidateID . The $ is used for variables and the @ is used for attributes.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
BEAUTIFUL!! It works! Thanks so much!
|
|
|
|
|
Anybode have done like:
Node BOOK1 in a GroupBox and all the inner nodes(title1,author1 etc...) as an LABEL inside the node BOOK1.New GroupBox for BOOK2 and same for that...Please help....
<bookstore>
<book1 genre1="autobiography" publicationdate1="1981" ISBN1="1-861003-11-0">
<title1>The Autobiography of Benjamin Franklin</title1>
<author1>
<first-name1>Benjamin</first-name1>
<last-name1>Franklin</last-name1>
</author1>
<price1>8.99</price1>
</book1>
<book2 genre2="novel" publicationdate2="1967" ISBN2="0-201-63361-2">
<title2>The Confidence Man</title2>
<author2>
<first-name2>Herman</first-name2>
<last-name2>Melville</last-name2>
</author2>
<price2>11.99</price2>
</book2>
</bookstore>
fghfhgfgcncnb
|
|
|
|
|
To the point, I want to create a table on class XML summary comment. Well I want to create the table because I want to use NDoc to build the documentation of the class of my library. But I don't know how to create it. The table is static not load data on database (SQL, MySQL, etc.) it just like this :
Can anyone help me, please.
Regards,
Ariston Darmayuda.
|
|
|
|
|
You can use a list :
<summary>
This is a table.
<list type="table">
<listheader>
<term>Col A</term>
<term>Col B</term>
</listheader>
<item>
<description>1</description>
<description>2</description>
</item>
<item>
<description>3</description>
<description>4</description>
</item>
</list>
</summary>
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Hi, I have a xml string that I have to parse. I am using xpath to parse this string. I can get to the part <b>A1:ABCID="4567"</b> but when I try to access <b>A2:parentid="0123"</b>. It doens't let me.
can some help me out with the syntax example?
thanks
XML string is:
<?xml version="1.0" encoding="utf-16"?>
<A1:MyName A1:ABCID="4567" A2:parentid="0123"
xmlns:A2="http://abc.cdf.com/MySubscription/SinIN/2006/response"
xmlns:A1="http://abc.cdf.com/MySubscription/SinIN/2005/response>"
<A1:Necessities>"
<A1:Necessity A1:ID="3" />"
</A1:Necessities>"
</A1:MyName>"
-- modified at 10:22 Tuesday 8th August, 2006
Thanks
Needy
|
|
|
|