Adding version and stylesheet href to an XML content
Hi there guys!
I am new working with XML in Oracle 9i, so I would appreciate your tips. My problem is that I need to store a XML document into a variable, which must include the "version" and "stylesheet href" lines on its body.
For example, if I use the following sample query:
SELECT XMLCONCAT(
XMLELEMENT("TraspasoSaldo",
SELECT
XMLELEMENT("Encabezado",
XMLELEMENT("Valor1", 'Valor1'),
XMLELEMENT("Valor2", 'Valor2')
) As "Encabezado"
FROM Dual
SELECT
XMLELEMENT("Detalle",
XMLELEMENT("Valor1", 'Valor1'),
XMLELEMENT("Valor2", 'Valor2')
) As "Detalle"
FROM Dual
).getclobval()
INTO
XMLCONTENTDATA --> Declared as: XMLCONTENTDATA CLOB := EMPTY_CLOB;
FROM Dual
;Above query saves the following XML content in the XMLCONTENTDATA variable, which is correct:
<TraspasoSaldo>
<Encabezado>
<Valor1>Valor1</Valor1>
<Valor2>Valor2</Valor2>
</Encabezado>
<Detalle>
<Valor1>Valor1</Valor1>
<Valor2>Valor2</Valor2>
</Detalle>
</TraspasoSaldo>But, I need to add next 2 lines to this XML document:
<?xml version = ''1.0''?>
<?xml-stylesheet href="../xsl_path/My_StyleSheet.xsl" type="text/xsl"?>I have tried many things without success, because the XML content always looses its properties and structure. For example, trying to avoid this problem, I have tried to concatenate these 2 lines using the following trick:
x := '<?xml version = ''1.0''?>' || CHR(13) || CHR(10);
len := length(x);
dbms_lob.writeappend(HEADCLOB, len, x);
x := '<?xml-stylesheet href="../xsl_path/My_StyleSheet.xsl" type="text/xsl"?>' || CHR(13) || CHR(10);
len := length(x);
dbms_lob.writeappend(HEADCLOB, len, x);
dbms_lob.append(HEADCLOB, XMLCONTENTDATA);
XMLCONTENTDATA := HEADCLOB;But at the end I just received a text file, instead of a XML document:
<?xmlversion=''1.0''?>
<?xml-stylesheethref="../xsl_path/My_StyleSheet.xsl"type="text/xsl"?>
<TraspasoSaldo><Encabezado><Valor1>Valor1</Valor1><Valor2>Valor2</Valor2></Encabezado><Detalle><Valor1>Valor1</Valor1><Valor2>Valor2</Valor2></Detalle></TraspasoSaldo>As you can see above, the XML structure is lost, so the content of the XMLCONTENTDATA variable is not an XML anymore.
Any tips or ideas?
Thanks very much in advance for any help on this issue!!
PS: It is required to save this XML content into a variable in order to pass its value to a program.
Best regards,
Francisco
As you can see above, the XML structure is lost, so the content of the XMLCONTENTDATA variable is not an XML anymore.The structure (i.e. format) is absolutely of no importance for a xml file.
What you have shown when concatenating the two parts still make a valid xml !!
Nevertheless you can also always do sth like
SQL> with t as (
select dbms_xmlgen.getxmltype('select * from dept where rownum =1') xml from dual
-- generate some sample xml
select xmltype('<?xml version = ''1.0''?>
<?xml-stylesheet href="../xsl_path/My_StyleSheet.xsl" type="text/xsl"?>' || xml) xml from t
XML
<?xml version="1.0"?>
<?xml-stylesheet href="../xsl_path/My_StyleSheet.xsl" type="text/xsl"?>
<ROWSET>
<ROW>
<DEPTNO>10</DEPTNO>
<DNAME>ACCOUNTING</DNAME>
<LOC>NEW YORK</LOC>
</ROW>
</ROWSET>
1 row selected.
Similar Messages
-
Compare 2 different xml versions and highlite the differences
Hi,
Currently we have xml and that is displayed on the web page using the css style sheets.
The xml we have remain the same most part but with small changes (say different version created after a week).
We want to be able to track the differences from the previous version and highlight them, the differences, when showing it in the web page.
Please advise if this can be done and how.
Thanks.try
SQL> set serveroutput on
SQL> set long 50000
SQL>
SQL> declare
2
3 --main
4 xml1 xmltype := xmltype('<ROWSET>
5 <ROW>
6 <EMPNO>7934</EMPNO>
7 <ENAME>MILLER</ENAME>
8 <JOB>CLERK</JOB>
9 <MGR>7782</MGR>
10 <HIREDATE>1982-01-23T00:00:00</HIREDATE>
11 <REMOVED>abc</REMOVED>
12 <SAL>1300</SAL>
13 <COMM/>
14 <DEPTNO>10</DEPTNO>
15 </ROW>
16 </ROWSET>');
17 --new
18 xml2 xmltype := xmltype('<ROWSET>
19 <ROW>
20 <EMPNO>7934</EMPNO>
21 <ENAME>MILLER</ENAME>
22 <JOB>CLERK</JOB>
23 <MGR>7782</MGR>
24 <ADDED>xyz</ADDED>
25 <HIREDATE>1982-01-23T00:00:00</HIREDATE>
26 <SAL>1300</SAL>
27 <COMM/>
28 <DEPTNO>10</DEPTNO>
29 </ROW>
30 </ROWSET>');
31 diff xmltype;
32
33 xtype varchar2(80);
34 xpath varchar2(80);
35 xpathChild varchar2(80);
36 xnodeChild varchar2(80);
37 new_value xmltype;
38
39 new_xml xmltype;
40
41
42 begin
43
44 -- get diff
45 select xmldiff(xml1, xml2) into diff from dual;
46 dbms_output.put_line(diff.getclobval());
47
48 -- that have
49 select x.xtype, x.xpath, x.new_value
50 into xtype, xpath, new_value
51 from xmltable(
52 xmlnamespaces('http://xmlns.oracle.com/xdb/xdiff.xsd' as "xd"
53 ,'http://www.w3.org/2001/XMLSchema-instance' as "xsi"
54 )
55 , '/xd:xdiff'
56 passing diff
57 columns xtype varchar2(80) path 'local-name(xd:insert-node-before)'
58 , xpath varchar2(80) path'xd:insert-node-before/@xd:xpath'
59 , new_value xmltype path 'xd:insert-node-before/xd:content/*'
60 ) x;
61
62 dbms_output.put_line('type of doing: ' || xtype);
63 dbms_output.put_line('path for doing: ' || xpath);
64 dbms_output.put_line('value for doing: ' || new_value.getclobval());
65
66 if (xtype = 'insert-node-before') then
67 xpathChild := substr(xpath, 1, instr(xpath, '/',-1)-1);
68 xnodeChild := substr(xpath, instr(xpath, '/',-1)+1);
69
70 select insertChildXMLbefore (xml1,
71 xpathChild,
72 xnodeChild,
73 XMLType('<HIGHLIGHT>' || new_value || '</HIGHLIGHT>'))
74 into new_xml
75 from dual;
76 end if;
77
78
79 dbms_output.put_line(new_xml.getclobval());
80
81 end;
82 /
<xd:xdiff xsi:schemaLocation="http://xmlns.oracle.com/xdb/xdiff.xsd http://xmlns.oracle.com/xdb/xdiff.xsd" xmlns:xd="http://xmlns.oracle.com/xdb/xdiff.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><?oracle-xmldiff operations-in-docorder="true" output-model="snapshot" diff-algorithm="global"?><xd:insert-node-before xd:node-type="element" xd:xpath="/ROWSET[1]/ROW[1]/HIREDATE[1]"><xd:content><ADDED>xyz</ADDED></xd:content></xd:insert-node-before><xd:delete-node xd:node-type="element" xd:xpath="/ROWSET[1]/ROW[1]/REMOVED[1]"/></xd:xdiff>
type of doing: insert-node-before
path for doing: /ROWSET[1]/ROW[1]/HIREDATE[1]
value for doing: <ADDED>xyz</ADDED>
<ROWSET><ROW><EMPNO>7934</EMPNO><ENAME>MILLER</ENAME><JOB>CLERK</JOB><MGR>7782</MGR><HIGHLIGHT><ADDED>xyz</ADDED></HIGHLIGHT><HIREDATE>1982-01-23T00:00:00</HIREDATE><REMOVED>abc</REMOVED><SAL>1300</SAL><COMM/><DEPTNO>10</DEPTNO></ROW></ROWSET>
PL/SQL procedure successfully completed
SQL>
SQL> select * from v$version where rownum=1;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
SQL> -
I can not delete my history and adding new bookmarks.
Upgrading to later Firefox versions and/or re-installing didn't rectify it either.
The address bar still shows the web addresses of old and whenever I make new bookmarks, it's always gone as if it was never made.
Also, I have noticed that every once in awhile you can not close tabs you've opened, either by pushing on the X button and/or clicking on the mouse to close it. Although closing the window and opening it again (without closing the Firefox application) seemed to rectify the problem in the short term, it's becoming quite annoying.
== This happened ==
Every time Firefox opened
== the Firefox is being usedI think I have a solution.
First, download the add-on SQManager. This should be included with FireFox, it is really good.
Look for the file '''moz_hosts''' in the folder '''places.sqlite'''.
Don't delete the file, just delete the information in the file. My file has over 3600 websites, which go back years!! I did not know they were there, but I was frustrated about not being able to get rid of them. They popped up every time I used the address bar. Clearing my history would not get rid of them.
This is where they are stored!! I found that by deleting the pesky web site from '''moz_hosts''', it does not appear in my address bar anymore!!!
I think that if I just delete all the websites in moz_hosts....
Wa-la...History Gone!!!
As long as you don't delete the file, just empty it, FireFox won't know the difference. It will just keep adding websites to it until you empty it again.
Why running "clear recent history" doesn't do this, I don't know. You are doing manually what "clear recent history" is not doing.
Please tell me if you see any flaw in this.
''I think it's the solution we've all been looking for!'' -
XML DevCon 2001: Submit schema and stylesheet problems- win XML Spy
There are only a few days to submit schema and stylesheet problems for XML
DevCon 2001 in London. If the workshop instructors use your submission
during the conference, you win a copy of XML Spy.
<shamelessPlug>
XML DevCon 2001 has a content-rich technical program with a faculty that
includes Henry Thompson (W3C Fellow), Peter Chen (IEEE Fellow, ACM
Fellow),
Martin Bryan (DIFFUSE Project), and authors such as Bob DuCharme, Ian
Graham, Elliotte Rusty Harold, G. Ken Holman, Benoît Marchal, JP
Morgenthal,
and Simon St. Laurent. There are a variety of eBusiness sessions,
including
panel discussions and presentations about ebXML, Web Services, and UDDI.
The program includes presentations by Jonathan Borden, Ron Bourret, Lee
Buck, Alex Chaffee, Mark Colan, John Evdemon, Meike Klettke, Andy
Longshaw,
Ingo Macherius, Simon Nicholson, David Orchard, Sebastian Rahtz, Daniel
Rivers-Moore, Michael Rys, Krishna Sankar, Matt Sergeant, Richard Tobin,
Priscilla Walmsley, David RR Webber and other distinguished faculty.
</shamelessPlug>
http://www.xmldevcon2001.com/London/html/conference.php
For a free pass to exhibits and special events (keynotes, joint XML UK and
British Computer Society meeting, OASIS XPath/XSLT meeting, vendor
presentations):
http://www.xmldevcon2001.com/London/html/special_events.php
Public submissions (schemas and stylesheets)
Three members of the W3C Schema Working Group (Michael Rys, Henry
Thompson, Priscilla Walmsley) will teach a Schema Workshop. Submit
problem schemas to them by e-mail:
[email protected]
or
http://www.xmldevcon2001.com/London/html/session.php?code=W5
Sebastian Rahtz, Bob DuCharme, Benoît Marchal, and Ken Holman will
present the "Stylesheets and Transformations: Best Practices" workshop on
Thursday, February 22 in London. To submit a stylesheet or problem
description for their workshop:
[email protected]
or browse to:
http://www.xmldevcon2001.com/London/html/session.php?code=T17
========== Ken North ======================
See you at Javacon 2001 (New York, March 1)
www.javacon2001.com
XML DevCon 2001: London (February 21-23) New York (April 8-11)
www.xmldevcon2001.com
=======================================Looks okay to me. But then I have no idea of what those "problems" are that you mentioned. Was there a particular reason you didn't tell us what they are?
-
Adding workflow process owners for Scenarios/Versions and Entities
Hi. I want to add managers and their email addresses for each combination of Scenarios/Versions and each Entity member.
I see when I'm in the Application I can go into File | Workflow , Manage Process I can see that under the "Current Owner", each entity is showing "Not Available".
How can I add these owner(s) for ech entity so that a process can be started for each entity and the next higher person in management gets notified?
Thanks!The administrator or the user with the admin access initiates the workflow for each entity and assigns to a person. So that person becomes the owner. After he completes he promotes it to the next level. Only the current owner will have the access to that particular entity. The process continues.
-
How to add .xml, .js and .css files to a xml viewer?
Hi,
I have a xml viewer in a web part to display a moving txt message.
I created a doc. library called XmlWebParts and in it 3 files with the same name. I am referring the xml file in the doc library with no issues.
WarningMessage.xml
<script type="text/javascript" src="http://icare/sites/IT/tst/XmlWebParts/WarningMessage/WarningMessage.js"></script>
<div class="marquee">jQuery marquee is the best marquee plugin in the world</div>
<br/>
<a class='p' href='#'>Pause</a> | <a class='r' href='#'>Resume</a>
<link rel="stylesheet" type="text/css" href="http://icare/sites/IT/tst/XmlWebParts/WarningMessage/WarningMessage.css"/>
WarningMessage.js
var $mq = $('.marquee').marquee();
//Pause
$('.p').click(function(){
$mq.marquee('pause');
//Resume
$('.r').click(function(){
$mq.marquee('resume');
and
WarningMessage.css
.marquee {
width: 300px;
border: 1px solid #ccc;
background: #ccc;
The issue I am having is that the txt display with the formatting but is not moving, is just display the txt.
I followed this: http://social.technet.microsoft.com/wiki/contents/articles/20764.sharepoint-2013-build-a-webpart-using-html-javascript-and-the-xml-viewer-web-part.aspx
What I am doing wrong?Is not working for me.
I have the
WarningMessage.xml
<script type="text/javascript" src="http://icare/sites/IT/tst/XmlWebParts/WarningMessage/WarningMessage.js"></script>
WarningMessage.js
<script type="text/javascript">
<
//set the marquee parameters
function init() { rtl_marquee.start(); }
var rtl_marquee_Text = 'JavaScript scrolling text';
var rtl_marquee_Direction = 'left';
var rtl_marquee_Contents='<span style="font-family:Comic Sans MS;font-size:12pt;white-space:nowrap;">' + rtl_marquee_Text + '</span>';
rtl_marquee = new xbMarquee('rtl_marquee', '19px', '90%', 6, 100, rtl_marquee_Direction, 'scroll', rtl_marquee_Contents);
window.setTimeout( init, 200);
</script>
xbMarquee.js
document.writeln('<style type="text/css">');
document.writeln(' div.marqueecenter1 { text-align: center; }');
document.writeln(' div.marqueecenter2 { margin- margin-right: auto; }');
document.writeln(' div.marqueeleft1 { text-align: left; }');
document.writeln(' div.marqueeleft2 { margin- margin-right: auto; }');
document.writeln(' div.marqueeright1 { text-align: right; }');
document.writeln(' div.marqueeright2 { margin- margin-right: 0; }');
document.writeln('</style>');
function xbMarquee(id, height, width, scrollAmount, scrollDelay, direction, behavior, html)
this.id = id;
this.scrollAmount = scrollAmount ? scrollAmount : 6;
this.scrollDelay = scrollDelay ? scrollDelay : 85;
this.direction = direction ? direction.toLowerCase() : 'left';
this.behavior = behavior ? behavior.toLowerCase() : 'scroll';
// this.name = 'xbMarquee_' + (++xbMarquee._name);
this.name = id;
this.runId = null;
this.html = html;
this.isHorizontal = ('up,down'.indexOf(this.direction) == -1);
if (typeof(height) == 'number')
this.height = height;
this.heightUnit = 'px';
else if (typeof(height) == 'string')
this.height = parseInt('0' + height, 10);
this.heightUnit = height.toLowerCase().replace(/^[0-9]+/, '');
else
this.height = 100;
this.heightUnit = 'px';
if (typeof(width) == 'number')
this.width = width;
this.widthUnit = 'px';
else if (typeof(width) == 'string')
this.width = parseInt('0' + width, 10);
this.widthUnit = width.toLowerCase().replace(/^[0-9]+/, '');
else
this.width = 100;
this.widthUnit = 'px';
// xbMarquee UI events
this.onmouseover = null;
this.onmouseout = null;
this.onclick = null;
// xbMarquee state events
this.onstart = null;
this.onbounce = null;
var markup = '';
if (document.layers)
markup = '<ilayer id="' + this.id + 'container" name="' + this.id + 'container" ' +
'height="' + height + '" ' +
'width="' + width + '" ' +
'clip="' + width + ', ' + height + '" ' +
'>' +
'<\/ilayer>';
else if (document.body && typeof(document.body.innerHTML) != 'string')
markup = '<div id="' + this.id + 'container" name="' + this.id + 'container" ' +
'style=" ' +
'height: ' + this.height + this.heightUnit + '; ' +
'width: ' + this.width + this.widthUnit + '; ' +
'clip: rect(0px, ' + this.width + this.widthUnit + ', ' + this.height + this.heightUnit + ', 0px); ' +
'">' +
'<div id="' + this.id + '" style="' +
(this.isHorizontal ? 'width:0px;' : '') + // if we scroll horizontally, make the text container as small as possible
'">' +
(this.isHorizontal ? '<nobr>' : '') +
this.html +
(this.isHorizontal ? '<\/nobr>' : '') +
'<\/div>' +
'<\/div>';
else
markup = '<div id="' + this.id + 'container" name="' +
this.id + 'container" ' +
'style=" overflowY: visible; ' +
'height: ' + this.height + this.heightUnit + '; ' +
'width: ' + this.width + this.widthUnit + '; ' +
'clip: rect(0px, ' + this.width + this.widthUnit + ', ' + this.height + this.heightUnit + ', 0px); ' +
'">' +
'<\/div>';
document.write(markup);
window[this.name] = this;
// Class Properties/Methods
xbMarquee._name = -1;
xbMarquee._getInnerSize = function(elm, propName)
var val = 0;
if (document.layers)
// navigator 4
val = elm.document[propName];
else if (elm.style && typeof(elm.style[propName]) == 'number')
// opera
// bug in Opera 6 width/offsetWidth. Use clientWidth
if (propName == 'width' && typeof(elm.clientWidth) == 'number')
val = elm.clientWidth;
else
val = elm.style[propName];
else
//mozilla and IE
switch (propName)
case 'height':
if (typeof(elm.offsetHeight) == 'number')
val = elm.offsetHeight;
break;
case 'width':
if (typeof(elm.offsetWidth) == 'number')
val = elm.offsetWidth;
break;
return val;
xbMarquee.getElm = function(id)
var elm = null;
if (document.getElementById)
elm = document.getElementById(id);
else
elm = document.all[id];
return elm;
xbMarquee.dispatchUIEvent = function (event, marqueeName, eventName)
var marquee = window[marqueeName];
var eventAttr = 'on' + eventName;
if (!marquee)
return false;
if (!event && window.event)
event = window.event;
switch (eventName)
case 'mouseover':
case 'mouseout':
case 'click':
if (marquee[eventAttr])
return marquee['on' + eventName](event);
return false;
xbMarquee.createDispatchEventAttr = function (marqueeName, eventName)
return 'on' + eventName + '="xbMarquee.dispatchUIEvent(event, \'' + marqueeName + '\', \'' + eventName + '\')" ';
// Instance properties/methods
xbMarquee.prototype.start = function ()
var markup = '';
this.stop();
if (!this.dirsign)
if (!document.layers)
this.containerDiv = xbMarquee.getElm(this.id + 'container')
if (typeof(this.containerDiv.innerHTML) != 'string')
return;
// adjust the container size before inner div is filled in
// so IE will not hork the size of percentage units
var parentNode = null;
if (this.containerDiv.parentNode)
parentNode = this.containerDiv.parentNode;
else if (this.containerDiv.parentElement)
parentNode = this.containerDiv.parentElement;
if (parentNode &&
typeof(parentNode.offsetHeight) == 'number' &&
typeof(parentNode.offsetWidth) == 'number')
if (this.heightUnit == '%')
this.containerDiv.style.height =
parentNode.offsetHeight * (this.height/100) + 'px';
if (this.widthUnit == '%')
this.containerDiv.style.width =
parentNode.offsetWidth * (this.width/100) + 'px';
markup += '<div id="' + this.id + '" name="' + this.id + '" ' +
'style=" ' +
//(this.isHorizontal ? 'width:0px;' : '') + // if we scroll horizontally, make the text container as small as possible
'" ' +
xbMarquee.createDispatchEventAttr(this.name, 'mouseover') +
xbMarquee.createDispatchEventAttr(this.name, 'mouseout') +
xbMarquee.createDispatchEventAttr(this.name, 'click') +
'>' +
(this.isHorizontal ? '<nobr>' : '') +
this.html +
(this.isHorizontal ? '<\/nobr>' : '') +
'<\/div>';
this.containerDiv.innerHTML = markup;
this.div = xbMarquee.getElm(this.id);
this.styleObj = this.div.style;
else /* if (document.layers) */
this.containerDiv = document.layers[this.id + 'container'];
markup =
'<layer id="' + this.id + '" name="' + this.id + '" top="0" left="0" ' +
xbMarquee.createDispatchEventAttr(this.name, 'mouseover') +
xbMarquee.createDispatchEventAttr(this.name, 'mouseout') +
xbMarquee.createDispatchEventAttr(this.name, 'click') +
'>' +
(this.isHorizontal ? '<nobr>' : '') +
this.html +
(this.isHorizontal ? '<\/nobr>' : '') +
'<\/layer>';
this.containerDiv.document.write(markup);
this.containerDiv.document.close();
this.div = this.containerDiv.document.layers[this.id];
this.styleObj = this.div;
if (this.isHorizontal && this.height < xbMarquee._getInnerSize(this.div, 'height') )
this.height = xbMarquee._getInnerSize(this.div, 'height')
this.containerDiv.style.height = this.height + this.heightUnit;
this.containerDiv.style.clip = 'rect(0px, ' + this.width + this.widthUnit + ', ' + this.height + this.heightUnit + ', 0px)';
// Start must not run until the page load event has fired
// due to Internet Explorer not setting the height and width of
// the dynamically written content until then
switch (this.direction)
case 'down':
this.dirsign = 1;
this.startAt = -xbMarquee._getInnerSize(this.div, 'height');
this._setTop(this.startAt);
if (this.heightUnit == '%')
this.stopAt = this.height * xbMarquee._getInnerSize(this.containerDiv, 'height') / 100;
else
this.stopAt = this.height;
break;
case 'up':
this.dirsign = -1;
if (this.heightUnit == '%')
this.startAt = this.height * xbMarquee._getInnerSize(this.containerDiv, 'height') / 100;
else
this.startAt = this.height;
this._setTop(this.startAt);
this.stopAt = -xbMarquee._getInnerSize(this.div, 'height');
break;
case 'right':
this.dirsign = 1;
this.startAt = -xbMarquee._getInnerSize(this.div, 'width');
this._setLeft(this.startAt);
if (this.widthUnit == '%')
this.stopAt = this.width * xbMarquee._getInnerSize(this.containerDiv, 'width') / 100;
else
this.stopAt = this.width;
break;
case 'left':
default:
this.dirsign = -1;
if (this.widthUnit == '%')
this.startAt = this.width * xbMarquee._getInnerSize(this.containerDiv, 'width') / 100;
else
this.startAt = this.width
this._setLeft(this.startAt);
// this.stopAt = -xbMarquee._getInnerSize(this.div,'width')*2;
// this method does not work very well with FireFox. offsetWidth property used in this function returns the absolute width of the div container
// instead of the new offsetWidth when innerHTML is added or when the div becomes wider. To overcome this a new span element is added to
// the document body to measure the new offsetwidth and then it is removed.
var temp_span = document.createElement('span');
temp_span.id = 'span_' + this.div.id;
temp_span.innerHTML = this.html;
document.body.appendChild(temp_span);
this.stopAt = - temp_span.firstChild.firstChild.offsetWidth;
document.body.removeChild(temp_span);
break;
this.newPosition = this.startAt;
this.styleObj.visibility = 'visible';
this.newPosition += this.dirsign * this.scrollAmount;
if ( (this.dirsign == 1 && this.newPosition > this.stopAt) ||
(this.dirsign == -1 && this.newPosition < this.stopAt) )
if (this.behavior == 'alternate')
if (this.onbounce)
// fire bounce when alternate changes directions
this.onbounce();
this.dirsign = -this.dirsign;
var temp = this.stopAt;
this.stopAt = this.startAt;
this.startAt = temp;
else
// fire start when position is a start
if (this.onstart)
this.onstart();
this.newPosition = this.startAt;
switch(this.direction)
case 'up':
case 'down':
this._setTop(this.newPosition);
break;
case 'left':
case 'right':
default:
this._setLeft(this.newPosition);
break;
this.runId = setTimeout(this.name + '.start()', this.scrollDelay);
xbMarquee.prototype.stop = function ()
if (this.runId)
clearTimeout(this.runId);
this.runId = null;
xbMarquee.prototype.setInnerHTML = function (html)
if (typeof(this.div.innerHTML) != 'string')
return;
var running = false;
if (this.runId)
running = true;
this.stop();
this.html = html;
this.dirsign = null;
if (running)
this.start();
// fixes standards mode in gecko
// since units are required
if (document.layers)
xbMarquee.prototype._setLeft = function (left)
this.styleObj.left = left;
xbMarquee.prototype._setTop = function (top)
this.styleObj.top = top;
else
xbMarquee.prototype._setLeft = function (left)
this.styleObj.left = left + 'px';
xbMarquee.prototype._setTop = function (top)
this.styleObj.top = top + 'px';
Still not working. Nothing will display on my web part xml viewer. -
How to read xml-stylesheet Processing Instruction from XML using DOM Parser
Hi,
I am trying to read an xml that contains xsl stylesheet PI using DOMParser. The parse() method reads the entire contents of the XML except the PI instruction. Below is the XML I am using to read
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="../../../lang/en-us/style0/usc_profile.xsl" type="text/xsl"?>
<Oblix oblang="en-us" xmlns="http://www.oblix.com/" xmlns:oblix="http://www.oblix.com/">
<ObProfile>
</ObProfile>
</Oblix>
Can anyone let me know if there are any propery settings to be done for the DOM parser before parsing?. If so, what is the property to be set?.
Thanks in Advance
MuthuA COTS product builds the XML and inserts the respective xsl (xml:stylesheet) file name to be used for transforming the xml. I am trying to interrupt this xml and make some updations on an element and finally send the updated xml to the stream.
For the above process, I parse the input XML using DOMParser and update the elements (some internal elements). While I view the final XML that would be passed to the stream, I found the <?xml-stylesheet... PI is missing.
I somehow managed using a temp fix by doing the below. I manually pulled the PI using document.getFirstChild().getNodeValue() and reconstructed the PI and inserted it to the outgoing XML. This needs to be done every time. This might run into problems when more than one PI is used in the XML.
If the parsed XML could get the PI along with it the above problem could be resolved.
Is there any property that could be set on the parser (prior to parsing) to resolve the issue?. -
I have a Macbook Air. I have MS office installed and work in Excel often with no issues. But When I download an excel spread sheet from a Ford web site I seem to be getting code and not the work sheet.
Example-
MIME-Version: 1.0
X-Document-Type: Workbook
Content-Type: multipart/related; boundary="====Boundary===="
--====Boundary====
Content-Location: file:///C:/HOLD.XHT
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="utf-8"
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<HEAD>
<meta name="Excel Workbook Frameset">
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>BTB</x:Name>
<x:WorksheetSource HRef="./IBIT0001.xht"/>
</x:ExcelWorksheet>
<x:ExcelWorksheet>
<x:Name>GSM</x:Name>
<x:WorksheetSource HRef="./IBIT0002.xht"/>
</x:ExcelWorksheet>
<x:ExcelWorksheet>
<x:Name>RODetail</x:Name>
<x:WorksheetSource HRef="./IBIT0003.xht"/>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
</HEAD>
</HTML>
--====Boundary====
Content-Location: file:///C:/IBIT0001.xht
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="utf-8"
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<style>
<!--table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
@page
{margin:1.0in .75in 1.0in .75in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-page-orientation:landscape;}
tr
{mso-height-source:auto;}
col
{mso-width-source:auto;}
br
{mso-data-placement:same-cell;}
.style21
{color:blue;
font-size:10.0pt;
font-weight:400;
font-style:normal;
text-decoration:underline;
text-underline-style:single;
font-family:Arial;Try search/ask in the forum devoted entirely to Excel issues:
http://answers.microsoft.com/en-us/mac/forum/macexcel -
Adding pages and picking up existing CSS
I am working with a one page sales letter web site that I had someone put together for me in Dreamweaver. I want to add some content pages to it to beef up SEO. How do I pick up the CSS from the first page and apply it to rest of the pages? I have defined the site in a folder and added the additional pages there. thank you, Mel
In between the <head> </head> tags, insert:
<link rel="stylesheet" href="../your/path/to/stylesheet.css" type="text/css" media="screen" />
...making sure that the href points to the correct file path to your CSS stylesheet. -
I was asking if the sliding panels can be populated with an XML repeating region. I used Donald Booths tutorial about sliding panels and loaded an XML 'table' like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>XML Slide</title>
<script type="text/javascript"
src="../SpryAssets/SprySlidingPanels.js"></script>
<script src="../SpryAssets/xpath.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet"
href="../SpryAssets/SprySlidingPanels.css">
<style type="text/css">
.SlidingPanelsContentGroup {
position: relative;
width: 600px;
margin: 0px;
padding: 0px;
border: none;
.SlidingPanelsContent {
width: 300px;
height: 300px;
float:left;
overflow: hidden;
margin: 0px;
padding: 0px;
border: none;
</style>
<script type="text/javascript">
var dsLet = new Spry.Data.XMLDataSet("LetItSlide_Exp_02.xml", "slide/row");
dsLet.setColumnType("order", "html");
dsLet.setColumnType("link", "html");
</script>
</head>
<body>
<a href="#" onclick="sp1.showFirstPanel();">First Panel</a> | <a
href="#" onclick="sp1.showPreviousPanel();">Previous
Panel</a> |
<a href="#" onclick="sp1.showNextPanel();">Next Panel</a> | <a
href="#" onclick="sp1.showLastPanel();">Last Panel</a> |
<a href="#" onclick="sp1.showPanel('p4');">Panel 4</a>
<div id="panelwidget" class="SlidingPanels" spry:region="dsLet">
<div class="SlidingPanelsContentGroup" spry:repeat="dsLet">
<div class="SlidingPanelsContent" id="p{order}">{link}</div>
</div>
</div>
<script type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
</script>
</body>
</html>
I put {order} in the SlidingPanelsContent identity to number/name these Div containers. Viewing in Live Code, the code looks like I would expect it to. But when I select the next link the 'next' panel doesn't show content. What do I need to know to make this work? Is there a tutorial about this combo?Have a look here http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsFromData.html
Gramps -
How to get the values of all elements and sub elements from following xml
how to get the values of all elements and sub elements from following xml...
<?xml version="1.0" encoding="UTF-8" ?>
<List_AML_Finacle xmlns="http://3i-infotech.com/Cust_AML_Finacle.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://3i-infotech.com/Cust_AML_Finacle.xsd List_AML_Finacle.xsd">
<TransactionID>TransactionID</TransactionID>
<Match>
<Src_Matched_Field>Src_Matched_Field</Src_Matched_Field>
<List_Matched_Field>
<FSFM_Matches>
<NUMBER>NUMBER</NUMBER>
<TERROR>TERROR</TERROR>
<TU>TU</TU>
<NAMEU>NAMEU</NAMEU>
<DESCRIPT>DESCRIPT</DESCRIPT>
<KODCR>KODCR</KODCR>
<KODCN>KODCN</KODCN>
<AMR>AMR</AMR>
<ADDRESS>ADDRESS</ADDRESS>
<SD>SD</SD>
<RG>RG</RG>
<ND>ND</ND>
<VD>VD</VD>
<GR>GR</GR>
<YR>YR</YR>
<MR>MR</MR>
<CB_DATE>CB_DATE</CB_DATE>
<CE_DATE>CE_DATE</CE_DATE>
<DIRECTOR>DIRECTOR</DIRECTOR>
<FOUNDER>FOUNDER</FOUNDER>
<TERRTYPE>TERRTYPE</TERRTYPE>
</FSFM_Matches>
<OfacMatchDetails>
<UID>UID</UID>
<TITLE>TITLE</TITLE>
<SDNTYPE>SDNTYPE</SDNTYPE>
<REMARKS>REMARKS</REMARKS>
<ID_UID>ID_UID</ID_UID>
<IDTYPE>IDTYPE</IDTYPE>
<IDNUMBER>IDNUMBER</IDNUMBER>
<IDCOUNTRY>IDCOUNTRY</IDCOUNTRY>
<ISSUEDATE>ISSUEDATE</ISSUEDATE>
<EXPIRATIONDATE>EXPIRATIONDATE</EXPIRATIONDATE>
<ADDRESS1>ADDRESS1</ADDRESS1>
<ADDRESS2>ADDRESS2</ADDRESS2>
<ADDRESS3>ADDRESS3</ADDRESS3>
<CITY>CITY</CITY>
<STATEORPROVINCE>STATEORPROVINCE</STATEORPROVINCE>
<POSTALCODE>POSTALCODE</POSTALCODE>
<COUNTRY>COUNTRY</COUNTRY>
</OfacMatchDetails>
</List_Matched_Field>
</Match>
</List_AML_Finacle>avoid multi post
http://forum.java.sun.com/thread.jspa?threadID=5249519 -
I am running Firefox 4.0 version, but for some reason, it tries to download updates and then gets stuck on trying to connect to the update server. This has been happening the past few days. When I close the update, I can proceed in Firefox without incident (that I know of).
See:
* http://kb.mozillazine.org/Software_Update (Software Update not working properly)
Remove the files in the updates and updates\0 folder.<br />
You may need to delete active-update.xml and updates.xml as well if present.
C:\Documents and Settings\<user>\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates
(%USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox)
If you have problems with updating then easiest is to download the full version and uninstall the currently installed version and remove the Firefox program folder to do a clean install of the new version.
* Download a fresh Firefox copy and save the file to the desktop.
* Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
* Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
* Do not remove personal data if you uninstall the current version.
* It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
Your bookmarks and other profile data are stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox. -
Pages is telling me that I need a newer version before I can open my document. I have the latest version and I am able to open older versions. Whats up?
You have 2 versions of Pages on your Mac.
Pages 5 is in your Applications folder.
Pages '09/'08 is in your Applications/iWork folder.
You are alternately opening the wrong versions.
Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
Pages 5/5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
Pages 5.1 sometimes can not open its own files and you will get the warning that you need a newer version.
Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
Anything that is saved to iCloud is also converted to Pages 5 files.
All Pages files no matter what version and incompatibility have the same extension .pages.
Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
Apple has not only managed to confuse all its users, but also itself.
Note: Apple has removed over 100 features from Pages 5 and added many bugs:
http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
Peter -
Windows Vista Home Version and Adobe Flash Player 10.
I use Windows Vista Home Version and I am finding it difficult to download Adobe Flash Player 10.
It appears to have been downloaded but on examining Control Panel, I discovered that its content is empty (no size is aportioned to it).
Most importantly, I am unable to play videos that require adobe flash player.I understand Vista is a 32 bit.
IE 8 is what I have but I would consider IE 9 if that would be necessary.
Just a bit more update. I just tried to download Adobe FP 10 again with the following results, again:
The Adobe Download Manager windows shows:
FP 10.3 Status as 100% "Installation Pending".
FP 10.2 Status as 100% " Instatlling Application"
and that will go one forever but never really actually installs anything and just keeps cycling through the "Add to Download" e.g. "Fanbase", "Times Reader"
and "Adobe Air" (none of which I want added to the download), and the download and installation shows as 100%.
Go figure! -
Import of XML file failed in portal using XML Content and Action
Hi Friends,
I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
<GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
<Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context> <Property name="parent1" value="pcd:portal_content"/>
<Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
<Attributes>
<Attribute name="com.sap.portal.pcm.Description" type="text">
<AttributeValue value="" locale=""/>
<Attribute name="administration" type="string">
<AttributeValue value=""/>
</Attribute>
<Attribute name="Inheritance" type="string">
<AttributeValue value="NONFINAL"/>
</Attribute>
</Attribute>
<Attribute name="com.sap.portal.pcm.Title" type="text">
<AttributeValue value="test" locale=""/>
<AttributeValue value="test" locale="en"/>
<Attribute name="administration" type="string">
<AttributeValue value=""/>
</Attribute>
<Attribute name="mandatory" type="string">
<AttributeValue value="true"/>
</Attribute>
<Attribute name="Inheritance" type="string">
<AttributeValue value="NONFINAL"/>
</Attribute>
</Attribute>
</Attributes>
</Context>
</GenericCreator>
SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
Status Name Action Type Comment
General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
Dont know is there a service/ configurations needs to be done to enable this feature?.
Thanks
Edited by: hammad on Sep 4, 2009 5:48 PM
Edited by: hammad on Sep 4, 2009 5:49 PMThe problem statement is not very clear.
Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
Best Regards,
Prasanna K
Maybe you are looking for
-
Upper Super Drive doesn't work all the time
Not sure of the problem, but I am experiencing it only with my upper drive. I will put a CD in to burn and it will become unresponsive, can't even get it to open once it's in. Disk not recognized. Have to re-start computer to open drive bay. My lower
-
IPod nano Problem with Nike+iPod
Yesterday, I just got a new 3G Black iPod nano 8 GB. Sooner today, while looking its features, I found out about Nike+iPod application. Since this is my first iPod, I had no idea what it was. It was asking for the receiver to be connected. I thought
-
In the upper right hand corner of desktop I continually receive gray boxes with text asking me to accept/deny access to website access. "Do you want to allow connection to www.habbopromor7.blogspot.com". How do I get these removed permanently?
-
By default a item in a JList should selected
Hi I need a item in the JList should be selected(not the first item) by default while I am creating a new instances for the JList. Note: I am rendering a button in the JList. with regrads senthil kumar
-
Teststand best practices architecture for communicating with TCP instruments
Hi, I am using Teststand 2014 and LabVIEW 2013 SP1 as the module adapter. My Teststand sequence file includes communication with 3-5 different instruments via TCP/IP. Such as Spectrum analyzer, generator and other RF measurement devices. There are ma