f



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:

<xsl:for-each select="Body/Page/Line[@detail]">

<xsl:if test="count(fgman9|fgman5) = 0">
L<xsl:value-of select="@no"/>:<xsl:value-of select="onefield"/>
</xsl:if>

<xsl:if test="fgman9">
<xsl:value-of select="@no"/> Ouuch</xsl:if>

<xsl:if test="fgman5">
<xsl:value-of select="@no"/> Whoops</xsl:if>

</xsl:foreach>

But as the <fgmanXXX/> nodes could be named fgman0 to fgman1000 I would
prefer not to list everyone as arguments to the count() expression.

/Reiche

0
2/4/2004 7:56:55 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

3 Replies
2172 Views

Similar Articles

[PageSpeed] 23

Michael Reiche wrote:

> I know that this works:
> 
> <xsl:for-each select="Body/Page/Line[@detail]">
> 
> <xsl:if test="count(fgman9|fgman5) = 0">
> L<xsl:value-of select="@no"/>:<xsl:value-of select="onefield"/>
> </xsl:if>
> 
> <xsl:if test="fgman9">
> <xsl:value-of select="@no"/> Ouuch</xsl:if>
> 
> <xsl:if test="fgman5">
> <xsl:value-of select="@no"/> Whoops</xsl:if>
> 
> </xsl:foreach>
>

within a xsl:choose instruction you could filter out all elements having 
unwanted children using starts-with(), eg:

   <xsl:choose>
     <xsl:when test="*[starts-with(name(),'fgman')]" />
     <xsl:otherwise>
       L<xsl:value-of select="@no"/>:<xsl:value-of select="onefield"/>
     </xsl:otherwise>
   </xsl:choose>

markus

0
mspath (6)
2/5/2004 12:35:55 AM
"Michael Reiche" <reicheREMOVE@THISimage.dk> wrote in message
news:pan.2004.02.04.19.56.54.883621@THISimage.dk...
> 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

A text node does not have a name -- probably you mean "whose parent's name"
..

> is starting with "fgman" - in this example it is all <Line/> _except_
> <fgman9/> and <fgman5/> in <Line/> with @no of 10 and 13.


Use:

  /*/*/Line[not(*[starts-with(name(), 'fgman')])] [text()]


Cheers,

Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html


0
dnovatchev (267)
2/5/2004 5:40:45 AM
On Thu, 05 Feb 2004 06:40:45 +0100, Dimitre Novatchev [MVP] wrote:

> 
> 
> A text node does not have a name -- probably you mean "whose parent's name"
> .

Exactly!!!

> 
> 
> Use:
> 
>   /*/*/Line[not(*[starts-with(name(), 'fgman')])] [text()]
> 
> 

Well actually I found:

<xsl:if test="not(*[starts-with(name(), 'fgman')])">

to suit my needs.

> Cheers,
> 
> Dimitre Novatchev [XML MVP],
> FXSL developer, XML Insider,
> 
> http://fxsl.sourceforge.net/ -- the home of FXSL
> Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

Thank you Dimitre.

Regards,
Michael Reiche
0
2/5/2004 10:40:05 PM
Reply:

Similar Artilces:

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 ...

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. ------------------ =...

XSLT: concatenating selected text nodes
in XSLT, if I want to concatenate _all_ the child text nodes, I can just do <xsl:value-of select="."> however, if I want to select and concatente only _some_ of the text nodes. for instance <xsl:value-of select=".//foo/text()"> this doesn't work as it just takes the first element in the node set. Is there any way of achieving this without using <xsl:for-each> to explicitly loop round them all? TIA Andy use copy-of not value-of David "David Carlisle" <davidc@nag.co.uk> wrote in message news:yg4r7ktpnzq.fsf@penguin.nag.co.uk... > > use copy-of not value-of > worked a treat - thanks david. > > David ...

Why treat text nodes as nodes?
One of the things I find most unnatural about most XML APIs is that they try to abstract both elements and text into some kind of "node" object when they have virtually nothing in common. The reason these APIs do it is to make it possible for both text and elements to be children of elements. But there is another way. The XPath/XQuery data model does not allow two consecutive text nodes. As far as I can tell, most XML processing software automatically merges consecutive text nodes. This means that the number of text segments directly under an element is bound by the number of sub-elements plus 1 (PIs and comments may be treated as "pseudo-elements" for this purpose). As a result, it is always possible to associate each text segment with the element immediately preceding it within the parent and associate the first text element with the parent itself. No more text nodes. The only API I know that uses this trick is the ElementTree API for Python by Fredrik Lundh (http://effbot.org/zone/element-index.htm). Each Element object has a text and tail property for the text immediately inside the element and text following it within its parent element. Elements always have a tag, attributes and and zero or more children - which are always other elements. No mixed types. The text and tail attributes are always strings. This model should be very convenient for statically-typed languages like Java or C++. I find it ironic that this idea is probably used only in Pyt...

xslt help needed with element nodes embedded in text node
I'm but an amateur with xsl stylesheets. I need some help to the output of text nodes with embedded element nodes like the following: <uf><ns>This</ns> example</uf> <uf>Another <ns>This</ns> example</uf> <uf>Another <ns>This</ns></uf> I need to output the ns strings in italics. <xsl:apply-templates select="./uf" /> <xsl:template match="ns"> <i><xsl:value-of select="." /></i> </xsl:template> As long as the xml file is exported in lines as above the output is ok: "This example". (In this email I don't indicate the italicised part string.) But lately the document server hosting the application that contains xml files of the sort above changed the export of xml files. Now there are line breaks at each new element boundary: <uf> <ns>This</> example </uf> With my xsl code I get an additional space at the beginning and the end of the phrase: " This example ". I tried to get rid of them with <xsl:template match="text()"> <xsl:value-of select="normalize-space()" /> </xsl:template> But this results in "Thisexample". What is to be done? (There is no option to substitute the mandatory spaces with &#160;). Volker I tried <xsl:strip-space elements="uf" />. It doesn't help either. Volker Volker Le...

converting a document node and children into xml text
is there a way in javascript to convert a DOM node (and it's children) into an XML text. i'd like to save the text file somewhere and then later parse it to re-create the tree. thx. jman, google grouper, wrote: > is there a way in javascript to convert a DOM node (and it's children) > into an XML text. Yes. Traverse the DOM node subtree and output XML accordingly. > i'd like to save the text file somewhere and then later parse it > to re-create the tree. Why? jman wrote: > is there a way in javascript to convert a DOM node (and it's children) > ...

XPath for selecting elements which start with a text node???
Hi all, I need an XPath which selects all nodes of a specific name which start with a text node, i.e. I want the expression to select: <x> abcdefg <y>hijklmn</y> </x> but NOT <x> <y>hijklmn</y> abcdefg </x> I cant' seem to find the correct expression. Can somebody help? Thanks, Thomas Thomas Schmidt wrote: > I need an XPath which selects all nodes of a specific name which start > with a text node Node with specific name (x) with a first child that is a text node. x/node()[0][self::text()] -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry Thomas Schmidt wrote: > I need an XPath which selects all nodes of a specific name which start > with a text node Node with specific name (x) with a first child that is a text node. x/node()[1][self::text()] -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry Thomas Schmidt <Bernd.Moos@googlemail.com> wrote in <1184757177.171349.289160@j4g2000prf.googlegroups.com>: > I need an XPath which selects all nodes of a specific name > which start with a text node, i.e. I want the expression > to select: x[child::node()[1][self::text()]] > <x> > abcdefg > <y>hijklmn</y> > </x> > > but NOT > > <x> > <y>hijklmn</y> > abcdefg > ...

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...

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.appendC...

How to select all texts of the document of the format of the selected text?
Hi,i have selected a text of the document with the specified font face, color and size in MS Word 2000. Now , I want to select all the relevant texts from the entire document with the same format(face,color and size) as of the selected text. so Is there any method or shortcut to do this op.? Not really. You have to "walk" the document checking the styles as you go along. And You have to watch out for cases where the style changes in the middle of a word (!) and code accordingly to get the desired results. chetan26nov@gmail.com wrote: > Hi,i have selected a text of the documen...

XPath
Hi, I have been experimenting and searching for information on how to retrieve the following using XPath. I may have three types of XML: <n>this is some text</n> OR <n> <p>this is some text</p> </n> OR <n> <p>this is some text</p> <p>some more text</p> </n> OR <n> this is some text <p>some more text</p> </n> The result I need includes ALL of the children and/or text but NOT the node element <n>. Some of the tested xpath queries <xsl:copy-of select="child::text()"/> <xsl:copy-of select="child::*"/> <xsl:copy-of select="self::*"/> <xsl:copy-of select="self::node()"/> <xsl:copy-of select="self::child"/> and of course <xsl:copy-of select="."/> which returns <n>. Any ideas? / jorge In article <1114446763.441590.223130@l41g2000cwc.googlegroups.com>, <jorgedelgadolopez@gmail.com> wrote: >The result I need includes ALL of the children and/or text but NOT the >node element <n>. > >Some of the tested xpath queries > ><xsl:copy-of select="child::text()"/> ><xsl:copy-of select="child::*"/> ><xsl:copy-of select="self::*"/> ><xsl:copy-of select="self::node()"/> ><xsl:copy-of select="self::child"/> > ...

xsl variable $node/text() but $node can non-node-set help!
I have a variable $value as a parameter in the following template: <xsl:template name="myTemplate"> <xsl:param name="value"/> <xsl:if test="$value"> <xsl:value-of select="$value"/> </xsl:if> </xsl:template> Now i call myTemplate sometimes whit the a parameter $value that is sometimes a text node, and sometimes it is not even a node. Example: <inputDoc> <a>hello</a> <a/> </inputDoc> xsl: <xsl:for-each select="/inputDoc/a"> <xsl:call-template name="myTemplate"> <xsl:with-param name="value" select="./text()"/> </xsl:call-template> </xsl:for-each> So i call myTemplate with parameter $value=a/text() But for the second <a> element in <inputDoc> there is not text() node. This gives me the following error: Cause: javax.xml.transform.TransformerException: The value is not a node-set With line number of the error pointing to the xsl:if in myTemplate. No i tried the function nilled(), but that is XPath 2.0, i only use XPath 1.0 and XSL 1.0 i know a possible solution is this: <xsl:for-each select="/inputDoc/a"> <xsl:choose> <xsl:when test=".[not(node())]"> <xsl:call-template name="myTemplate"> <xsl:with-param name="value" select="false()"/> </xsl:call-template> <...

Text nodes and element nodes query
Hi all, The code below gets me a list of all the nodes within the node object called xml_tags_root. NodeList nl = xml_tags_root.getChildNodes(); The length of nodelist I get is double the number of actual elements! This is because after every element node there is text node which is (I think) the whitespace in the XML document. Is there a way to get only the element nodes? Please advice. thanks, ASD Hi, Look at getElementsByTagName(....) Regards, Arnaud "asd" <arvindsd@yahoo.com> a �crit dans le message news: 1116833345.887839.95270@g47g2000cwa.googlegroups.com... &...

XML DOM: XML/XHTML inside a text node
In my program, I get input from the user and insert it into an XHTML document. Sometimes, this input will contain XHTML, but since I'm inserting it as a text node, xml.dom.minidom escapes the angle brackets ('<' becomes '&lt;', '>' becomes '&gt;'). I want to be able to override this behavior cleanly. I know I could pipe the input through a SAX parser and create nodes to insert into the tree, but that seems kind of messy. Is there a better way? Thanks. On Thu, 2 Nov 2005 noahlt@gmail.com wrote: > In my program, I get input from the us...

How to find non-existing nodes or nodes with no text
Ok, this must be simple but the more i search the more i don't find. It's about SimpleXML and PHP. How to find non-existing nodes or nodes with no text My XML file looks a little bit like this: i.e. 1 <discography> <CD> <title></title> <year>1978</year> </CD> </discography> i.e. 2: <discography> <CD> <year>1978</year> </CD> </discography> In i.e. 1, the tag <title> is empty. How do i test for empty tags in PHP? In i.e. 2, the tag <title> doesn't even exist. How do i ...

XSLT Delimited Text Node
Is there a way in XSLT to match on numbers that are delimited by a character or space in a text node? Mike King wrote: > Is there a way in XSLT to match on numbers that are delimited by a character > or space in a text node? XSLT 2.0 can do that nicely with the tokenize XPath 2.0 function e.g. with the input being <?xml version="1.0" encoding="UTF-8"?> <root> <data-list>1 2 3 4 5</data-list> </root> and the stylesheet <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" /> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:template> <xsl:template match="data-list"> <xsl:copy> <xsl:for-each select="tokenize(., '\s+')"> <data><xsl:value-of select="." /></data> </xsl:for-each> </xsl:copy> </xsl:template> </xsl:stylesheet> the result using Saxon 8.3 is <?xml version="1.0" encoding="UTF-8"?> <root> <data-list> <data>1</data> <data>2</data> <data>3</data> <data>4</dat...

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...

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:...

XSLT Extract Text from Nodes
Hello, I am new to the concept of XSL and am looking for some assistance. Take the following XML document: <binder> <author>Greg</author> <notes> <time>11:45</time> <content> This would be some content... every once in a while you may run into <heading>A Heading!</heading> Which could be followed by more content... and possible <heading>More Headings.</heading> and even more content! </content> </notes> </binder> What I would like to do is to be able to extract the value of the <content> node, and have special formatting for the headings. When I do something like: <xsl:value-of select="content" /> I receive the data within <content> - including the values of the nested <heading> nodes, but what I really want to be able to do is do is to have XSLT read the text of the <content> node until a <heading> node is reached, at which point the value of the heading node is formatted correctly and displayed, and then continued by the text of the <content> node after the <heading> until another <heading> is reached... etc etc... Could someone give me some pointers as to how this can be accomplished? gregmcmullinjr@gmail.com wrote: > <content> > This would be some content... every once in a while you may run > into > <heading>A Heading!</he...

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...

extracting text from an XML node
Hi, suppose i get the simple xml sample: <foo> 1 <bar>2</bar> 3 </foo> Now suppose i want to extract all the text of only the 'foo' node, ie expected result is '1 3'. I tried both <xsl:template match="foo"> <xsl:value-of select="text()" /> </xsl:template> and <xsl:template match="foo"> <xsl:value-of select="." /> </xsl:template> but the former lead to '1' and the latter to '1 2 3' (using xsltproc & firefox). What did i missed ? thanks, -Nicolas nicolas.edel@gmail.com wrote: > Now suppose i want to extract all the text of only the 'foo' node That isn't a built-in concept; you have to recast it as "all the text nodes which are immediate children of the 'foo' node". (The built-in text value of an element, as you discovered, is the value of all text contained in it, directly or indirectly). Note too that the whitespace (line breaks and indentation) will be part of the the text nodes unless you explicitly strip that away. <xsl:value-of select="text()" /> didn't work because value-of returns the contents of only the first matching node. This is one case where xsl:for-each is appropriate, to explicitly iterate through the text children. -- Joe Kesselman / Beware the fury of a patient man. -- John Dryden On Nov 30, 12:34 am, Joseph Kesselman <kesh...

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...

select dom text nodes
Hi, I want to select all the text nodes of an xml document using msxml dom. I tried using the selectNodes method with "//#text" argument. But it fails. Can anybody help please? Thank you. On Apr 13, 11:22 am, avs...@gmail.com wrote: > I want to select all the text nodes of an xml document > using msxml dom. I tried using the selectNodes method > with "//#text" argument. I don't believe there's a selectNodes() method in the W3C DOM specs. Assuming it accepts an XPath expression as an argument, what you need is '//text()'. #text is a nodeName, and is fairly meaningless in the context. Consider reading some sort of XPath tutorial, because invoking magic without understanding how it works is a recipe for disaster, as I can attest from painful personal experiences. -- Pavel Lepin Hey.. Thank you very much. That worked!! I m using MSXML and there is a selectNodes method. Yes, I agree that reading throughly before attempting a task is always the best way to work on something. Once in a while we all come across tasks where we dont have enough time to be thoroughly trained before attempting something. To be fair to me :-), I did go thru the material in MSDN on XPath. Most of it is given in the context of XSLT. That partly obstructed my learning. Inspite of that, I didnt find any reference to selecting all text nodes. After you pointed out, I did check the w3schools tutorial where I found a similar point documented, thanks to you...

Deleting selected text from text area
I was wondering if anyone could help. I'm trying to find how to delete text from a selected text Area. I'm a beginner in Java Netbeans. So go easy! This is what I tried but its not happening. int start = 0, end = 1; while ( start < end ) { start = SpeechText.getSelectionStart(); end = SpeechText.getSelectionEnd(); if ( start != end ) remove( SpeechText.getText() ); } tom79l@googlemail.com wrote: > I was wondering if anyone could help. I'm trying to find how to > delete text from a selected text Area. > > I'm a beginn...

Web resources about - XSLT Select nodes without text-node children whose names starts with specifix text - comp.text.xml

Resources last updated: 3/14/2016 1:06:52 AM