f



text node has text but won't render

This renders in Firefox perfectly well but the text in the red box remains
invisible. The program is a subset of a larger and doesn't do much. but
even after cutting out all the unneccessary stuf, I still can't get it to
work!!

Cheers,

Greg
===================
<xhtml:html  xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg" >
   <xhtml:head>
		<xhtml:title>
			Intermingled XHTML and SVG
		</xhtml:title>
		<xhtml:script type="text/javascript" language="JavaScript"><![CDATA[
			function gogo(evt){
				var targetObj = evt.target;				//The object that received the event
				var targetDoc = targetObj.ownerDocument;  //Owner document var wg =
				document.getElementById("SVGroot"); var lg =
				document.getElementById("labelz"); //label
				labelBox= targetDoc.createElementNS("http://www.w3.org/2000/svg",
				"svg:rect"); labelBox.setAttributeNS(null, "id", "label1");
				labelBox.setAttributeNS(null, "fill", "red");
				labelBox.setAttributeNS(null, "fill-opacity", 1);
				labelBox.setAttributeNS(null, "x", 700); labelBox.setAttributeNS(null,
				"y", 400); labelBox.setAttributeNS(null, "width", 200);
				labelBox.setAttributeNS(null, "height", 20);
				labelBox.setAttributeNS(null, "visibility", "visible");
				lg.appendChild(labelBox);
				
				labelText = targetDoc.createElementNS("http://www.w3.org/2000/svg",
				"svg:text"); labelText.setAttributeNS(null, "id", "labelText1");
				labelText.setAttributeNS(null, "x", "5");
				labelText.setAttributeNS(null, "y", "5");
				labelText.setAttributeNS(null, "style", "font-size:16px;
				font-weight:normal; font-family:arial serif; fill:#000000;
				fill-opacity:1; opacity:1"); labelBox.appendChild(labelText);
				
				textSpan = targetDoc.createElementNS("http://www.w3.org/2000/svg",
				"svg:tspan"); textSpan.setAttributeNS(null, "id", "tspan01");
				textSpan.setAttributeNS(null, "x", "5"); textSpan.setAttributeNS(null,
				"y", "5"); textSpan.setAttributeNS(null, "style", "font-size:16px;
				font-weight:normal; font-family:arial serif; fill:#000000;
				fill-opacity:1; opacity:1"); labelText.appendChild(textSpan);
				
				lblTxt = targetDoc.createTextNode("this text has just been created");
				textSpan.appendChild(lblTxt);
				document.getElementById("tspan01").firstChild.textContent = "this text
				has just been updated";
			}

			function hh(evt){
				var thisObj = evt.target;
				labelText = thisObj.getAttributeNS(null, "owner");
				document.getElementById("tspan01").firstChild.textContent = labelText;
				
			}
		]]></xhtml:script>
	</xhtml:head>
	<xhtml:body >
	
	<svg:svg width="1024px" height="768px" viewbox="0 0 1024 768"
	onload="gogo(evt);" id="SVG_diag" xmlns:diag="http://www.diag.com/" >
		<svg:g id="SVGroot">
			
		</svg:g>
		<svg:g id="labelz">
			
		</svg:g>
	</svg:svg>
	
	</xhtml:body>
</xhtml:html>
0
noh.way (6)
6/22/2006 11:07:34 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

1 Replies
397 Views

Similar Articles

[PageSpeed] 53


Greg wrote:

> This renders in Firefox perfectly well but the text in the red box remains
> invisible. The program is a subset of a larger and doesn't do much. 

You misunderstand the structure of SVG documents, it is rather flat, 
only svg or g elements are container elements of other shapes or text 
but your SVG text element does not belong as a child into the SVG rect 
element.
So put the SVG text element as a child in an SVG svg element or SVG g 
element.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (2052)
6/23/2006 11:25:13 AM
Reply:

Similar Artilces:

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

Controlling the text in plot 'xyz' title 'text'
Hi Can somebody help me out? I want to change the text fonts which appear in keys for every line, in command: plot "file" title "xyz" How to use desired font size for xyz above? Thanks -- Your's truly Masroor Bangesh help title: gnuplot> help title The `set title` command produces a plot title that is centered at the top of the plot. `set title` is a special case of `set label`. Syntax: set title {"<title-text>"} {offset <offset>} {"<font>{,<size>}"} {{textcolor | tc} {lt <line_type> | default}} {{no}enhanced} show title If <offset> is specified the title is moved by the given offset where <offset> is specified by either x,y or x,y,z, and may be preceded by `first`, `second`, `graph`, `screen`, or `character` to select the coordinate system. See `coordinates` for details. By default, the `character` coordinate system is used. For example, "`set title 0,-1`" will change only the y offset of the title, moving the title down by roughly the height of one character. <font> is used to specify the font with which the title is to be written; the units of the font <size> depend upon which terminal is used. `textcolor lt <n>` sets the text color to that of line type <n>. `noenhanced` requests that the title not be processed by the enhanced text mode parser, even if...

How do I 'SELECT All' text in a text box
I want to select all text in a multi line text box from a command butten. Thank for help Dave Try this... Private Sub Command1_Click() With Text1 .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With End Sub Rick - MVP "Dave" <last2try@earthlink.net> wrote in message news:fo0b90h0j9imbvntdea3uu2mefth5teufr@4ax.com... > I want to select all text in a multi line text box from a command > butten. > > Thank for help > Dave ...

Change the text of a 'Static Text'
Hello, I work now at a GUI in matlab. And I have the following code (function) for a Button Callback: function Button_Callback(hObject, eventdata, handles) set(handles.Status,'String','Busy!'); .... %.. some code that requires several seconds .... set(handles.Status,'String','Idle'); handles.Status is the handle for a StaticText control. What I want to do is to change the Text(Label) for the static text at the beginning (in "BUSY") and when everything is done to change it to "IDLE". My problem is that the Label/Text is changed only at t...

RB2006
In contrast to RS's usual sales campaign in which they only tell you about supposed new features, is the fact that many features have been removed RB with the introduction of RB2005, and continue to be removed. One of these features is the ability ot export a project as a plain text file. Yep, all you had to do was select "File: Export Source" to save a plain text file which you could then pop into any generic plain text editor and print what you want. Now they force you do do much more work by only allowing xml export. This demonstates that a feature which you buy RB n...

Pages
I have a titel-textfield over a pic (headline) , text is black, background for text transparent. A second textfield should overlapp the first textline..... When i arrange the second field with the same settings like the first, the first text disappear... How can i do, that the second text overpapps the first, all over the pic. Any help appreciated! Thanks for replies! I am german and hope that the engish speaking people understand my problem! Soory! Gerd In article <611db9e2-b085-4fe5-907a-ca714b0c32dd@m74g2000hsh.googlegroups.com>, hurlebaus <gerd.schenk@freenet.de> wrote:...

Can't get text to be recognized as text when figure is oriented tall or portrait
Hey folks, If I have a figure and I type: figure(1); orient landscape; print -f1 -dpsc 'myfig.ps'; when I import it into Corel everything comes out fine and the text is text. If I take the same figure and do: figure(1); orient tall; %or orient portrait; print -f1 -dpsc 'myfig.ps'; Corel doesn't understand that the text is text, and just uses curves, which is a real pain. Anyone with any idea as to what's going on? Thanks! I found that this opens fine in illustrator, but I use Corel. There seems to be a difference in the encoding that Corel can't handle in...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi...

Surrounding text with text
I was wondering if it was possible to surround a text body with text like so: +--------------+ |ABCDEFGHIJKLM | |H N| |A Main Body O| |L Text goes P| |B here Q| |-=+_ZYXWVUTSR | | | | | | | | | +--------------+ This seems far-fetched, but just curious. I suppose that I could just move stuff around by hand in the GIMP later on, but there's probably a {better,more {extensible,clean}} way of doing it from (La)TeX. -FreeSmith ptjm@interlog.com (Patrick TJ McPhee) wrote in message news:<bffbhe$per$1@news.eusc.inter.net>... > Peter Flynn had an example like that, which he either posted here or > posted a link here. It was something to do with a certificate -- try > searching for his name and that word in google. > > It wouldn't be hard to do with metapost. I have a macro called `pathalong' > which puts text along an arbitrary path. Well, it's been a while, but I finally finished it. It's a little job I was doing for an upcoming wedding. At any rate, I used pstricks to make the text go along a path, along with a couple of hacks for sizing (from graphicx) and kerning along the line (from soul). Here's the code (don't laugh): CAUTION:THIS CODE MAY MAKE YOU WRETCH ---SNIP--- \documentclass{article} \usepackage{graphicx} \usepackage{pstricks,pst-text,nopageno} \usepackage[width=8.5in]{geometry} \usepackage{soul} \begin{document} \thispagestyle{empty} \set...

Vertical alinement of text in a GUI 'static text' object
Hi to all, I have problems to verticaly aline text in GUI's 'static text' objects. For example, if the height of the 'static text' is set to 25 pixels and the font size to 12 the text is not verticaly centerd. While there is a property for horizontal alinement, I found no such property for vertical one. Can someone help? Thanks, Utzli ...

how to Update/insert an xml element's text----> (<element> text</element>)
hello friends, how can we update or insert into an xml Element. For example : ------------------- <?xml version="1.0"> <request> <main> <name>ISO8856</name> </main> </request> here when we run a java class file it should replace "ISO8856"with "ISO9001". Any Assistance or example. thanQ in adv. Ajay HANM wrote: > <?xml version="1.0"> > <request> > <main> > <name>ISO8856</name> > </main> > </request> > > here when we run a java class file it should replace "ISO8856"with > "ISO9001". Any Assistance or example. If you use the W3C DOM Level 3 Core as implemented in Java 1.5 and later then you can select the 'name' element and set its textContent e.g. Element name = (Element)xmlDocument.getElementsByTagName("name").item(0); name.setTextContent("ISO09001"); If you use DOM Level 2 Core (as implemente in Java 1.4) then you need to access the firstChild and set its nodeValue Element name = (Element)xmlDocument.getElementsByTagName("name").item(0); name.getFirstChild().setNodeValue("ISO09001"); -- Martin Honnen http://JavaScript.FAQTs.com/ Many good tutorials/articles exist on the web (and some bad ones, alas). I usually point people to http://www.ibm.com/xml -- Joe K...

How IE's and Firefox's XML DOM parsers deal with whitespace text nodes
Can someone please explain this section of this tutorial me? http://www.w3schools.com/dom/dom_mozilla_vs_ie.asp The relevant text I do not understand is: "Internet Explorer, when using node.childNodes[], will NOT contain these white-space nodes. In Mozilla, those nodes will be in the array." and "Internet Explorer will skip the white-space text nodes that are generated between nodes (e.g. new line characters), while Mozilla will not. So, in the example above, Mozilla browsers will alert 9 child nodes, while Internet Explorer will alert 4." I checked the said file: http://www.w3schools.com/dom/books.xml In both, Firefox 2.0 as well as IE 6.0, it had only 4 <book> elements. ...

I'm trying to filter body text in Eudora Pro 4.2 but it won't work...??
I'm trying to use Eudora Pro 4.2 to do simple body text filtering but it won't work. It looks very straight forward. And I have filters set up for Subjectlines, etc., that work just fine. But the "body" request doesn't work. I open the program, go to Window, then Filters, then New, then under Header I pick ">>Body<<" and type in the desired "containing" then have it transfer matching email to Trash. No problem! Except it doesn't work. At all. What am I doing wrong? FYI, I'm trying to filter out this one evil spam...

How IE's and Firefox's XML DOM parsers deal with whitespace text nodes #2
Can someone please explain this section of this tutorial me? http://www.w3schools.com/dom/dom_mozilla_vs_ie.asp The relevant text I do not understand is: "Internet Explorer, when using node.childNodes[], will NOT contain these white-space nodes. In Mozilla, those nodes will be in the array." and "Internet Explorer will skip the white-space text nodes that are generated between nodes (e.g. new line characters), while Mozilla will not. So, in the example above, Mozilla browsers will alert 9 child nodes, while Internet Explorer will alert 4." I checked the said file: http://www.w3schools.com/dom/books.xml In both, Firefox 2.0 as well as IE 6.0, it had only 4 <book> elements. Water Cooler v2 wrote: > The relevant text I do not understand is: > > "Internet Explorer, when using node.childNodes[], will NOT contain > these white-space nodes. In Mozilla, those nodes will be in the > array." > > and > > "Internet Explorer will skip the white-space text nodes that are > generated between nodes (e.g. new line characters), while Mozilla will > not. So, in the example above, Mozilla browsers will alert 9 child > nodes, while Internet Explorer will alert 4." > > I checked the said file: http://www.w3schools.com/dom/books.xml > > In both, Firefox 2.0 as well as IE 6.0, it had only 4 <book> elements. The DOM object model knows different kind of nodes, it knows element nodes but...

Browser Won't Insert Text
Mac G4 1.8Ghz running 10.3. Occasionally, various webpages will not accept inserted text in Safari, Mozilla, and Firefox. Rebooting, re-installing, repairing permissions, doesn't work. It's particularly annoying using Pair.com mail, which relies on the browser window. Any ideas what could cause this? Strange parameter corruptions? Option not set right? PHP errors? Any ideas???? Mark In article <1161545111.456670.172730@f16g2000cwb.googlegroups.com>, <gmark@svs.com> wrote: > Mac G4 1.8Ghz running 10.3. Occasionally, various webpages will not > accept inserted t...

XSLT Select nodes without text-node children whose names starts with specifix text
Question on XSL expression Got this XML: <Body> <Page> <Line no="9" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> <Line no="10" detail="true"> <onefield>onefieldstext</onefield> <fgman9>fgmanfieldstext</fgman9> <twofield>twofieldstext</twofield> </Line> <Line no="11" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> <Line no="12" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> <Line no="13" detail="true"> <onefield>onefieldstext</onefield> <fgman5>fgmanfieldstext</fgman5> <twofield>twofieldstext</twofield> </Line> <Line no="14" detail="true"> <onefield>onefieldstext</onefield> <twofield>twofieldstext</twofield> </Line> </Page> </Body> I would select the <Line/> nodes without text-node children whose names is starting with "fgman" - in this example it is all <Line/> _except_ <fgman9/> and <fgman5/> in <Line/> with @no of 10 and 13. I know that this works: &...

Reading Text File, Text Scrolling and erase line from a text file
Hi , How can I Reading Text File, then Text Scrolling by means of keys "page UP" "page Down" and erase a specific line from a text file , when press "F2" key? Best Regards, Lidia from Poland -- ========================================= Pozdrawiam Lidiaa Lidiaa schrieb: > Hi , > > How can I Reading Text File, then Text Scrolling by means of > keys "page UP" "page Down" and erase a specific line from a text > file , when press "F2" key? > > ...

Getting kind of abstract text snippets from text nodes
Hi everybody, I am about implementing a little search engine that searches a phrase over xml text nodes. I got that all working fine but what I want as the results is not the complete text of the textnode, I would like to make an abstract like result list (such output that you get with google searches. For eg .... I am the <b>substring</b> from a complete text node ... where "substring" is the search term. The problem is simple (I think): I want to extract all the text parts of the complete text node, where search searchterm is highlighted, surrounded by the text like 30 characters. I found an intersting post "cut down text" which is almost that what I am looking for, but there the text is just trimmed by x characters. Is anybody here, that has an "elegant" way to solve that or some hints that get me to the solution? I am not able to use regex (would be nice though) My parser is Sablotron so I am restricted to the functions that I get. (1.0). Any help is greatly appreciated. regards, Andreas W Wylach Think about dividing the text into three parts: before your target, the target itself, and after the target. Process each appropriately. If you want to report multiple instances within the same block of text, look at the standard examples of recursive text processing. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry "Andreas W. Wylach" <aw@ioc...

file command: "XML document text" vs "XML document text"
I've just used the file command on four files of RDF-XML with the following output: augtfidf.rdf: XML document text kyoto.rdf: XML document text stuff.rdf: XML document text tfidf.rdf: XML document text What does it mean that one of them has an extra space between "XML" and "document"? -- The kid's a hot prospect. He's got a good head for merchandising, an agent who can take you downtown and one of the best urine samples I've seen in a long time. [Dead Kennedys t-shirt] On 16.10.2012 16:06, Adam Funk wrote: > I've just used the file command on four files of RDF-XML with the > following output: > > augtfidf.rdf: XML document text > kyoto.rdf: XML document text > stuff.rdf: XML document text > tfidf.rdf: XML document text > > What does it mean that one of them has an extra space between "XML" > and "document"? Hard to tell without further information. What does file *.rdf | od -c show you? Janis Janis Papanagnou wrote: > On 16.10.2012 16:06, Adam Funk wrote: >> I've just used the file command on four files of RDF-XML with the >> following output: >> >> augtfidf.rdf: XML document text >> kyoto.rdf: XML document text >> stuff.rdf: XML document text >> tfidf.rdf: XML document text >> >> What does it mean that one ...

'GUI-Edit text ui control'-Way to detect mouse click in the edit text
Hi I am designing a graphical user interface. I have an edit text box. I would like that when a user double clicks inside the text box a new window open up with the options of inserting the text, else user can himself enter the text from the keyboard. The problem is that I am struggling to find a way to detect the mouse click inside the text box. I know about 'keypressfcn' but I suppose that does not check the mouse click. Please help me in this regard. Thank you in advace. Sumit "Olivier " <sumit.iitkgp@gmail.com> wrote in message <hq6ca7$r79$1@fred.mathwork...

CEdit sometimes won't accept text
Hi, I have a CFormView SDI application. The form has, amongst other things, a CButton and an object of type CConsole subclassed from CRichEdit2. When the user clicks on the button, I save a pointer to the CConsole object (as CConsole *) in a static variable and then create a worker thread. The 1st thing the worker thread did was to append some text to the CConsole object by sending a message thru the pointer, ie static CConsole * spzConsole; UINT WorkerThread(..) { spzConsole->Printf("Querying Device\n"); ... } This worked 99.999% of the ti...

Browser Won't Insert Text #2
Mac G4 1.8Ghz running 10.3. Occasionally, various webpages will not accept inserted text in Safari, Mozilla, and Firefox. Rebooting, re-installing, repairing permissions, doesn't work. It's particularly annoying using Pair.com mail, which relies on the browser window. Any ideas what could cause this? Strange parameter corruptions? Option not set right? PHP errors? Any ideas???? Mark gmark@svs.com wrote: > Mac G4 1.8Ghz running 10.3. Occasionally, various webpages will not > accept inserted text in Safari, Mozilla, and Firefox. Rebooting, > re-installing, > repairing ...

Web resources about - text node has text but won't render - comp.text.xml

Resources last updated: 3/13/2016 10:42:55 PM