f



XSL select only nodes which contain a specific child node

Given the following extremely simplified XML...

<AA>
  <BB></BB>
  <BB><CC>foo</CC></BB>
  <BB></BB>
  <BB><CC>bar</CC></BB>
</AA>

....is there an easy way to use and XSL select to get only the <BB>
nodes which have a <CC> child node?

<xsl:for-each select="AA/BB">

Gives me 4 nodes:

  <BB></BB>
  <BB><CC>foo</CC></BB>
  <BB></BB>
  <BB><CC>bar</CC></BB>


<xsl:for-each select="AA/BB/CC">

Gives me 2 nodes, but it's at the CC level and I need it to be at the
BB level because there's a bunch of other nodes there that need to be
processed as well.

  <CC>foo</CC>
  <CC>bar</CC>


I'm thinking that there must be some sort of conditional select XPATH
that will get me what I need:

  <BB><CC>foo</CC></BB>
  <BB><CC>bar</CC></BB>


Any tips?
0
wkrick (35)
7/8/2009 2:30:59 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

2 Replies
431 Views

Similar Articles

[PageSpeed] 15

William Krick wrote:
> Given the following extremely simplified XML...
> 
> <AA>
>   <BB></BB>
>   <BB><CC>foo</CC></BB>
>   <BB></BB>
>   <BB><CC>bar</CC></BB>
> </AA>
> 
> ...is there an easy way to use and XSL select to get only the <BB>
> nodes which have a <CC> child node?
> 
> <xsl:for-each select="AA/BB">

XSLT uses XPath to select nodes and with XPath you can do
   /AA/BB[CC]
to select those 'BB' child elements of the 'AA' root element which have 
at least one 'CC' child element.

With XPath 2.0 you could also write
   /AA/BB[exists(CC)]
which might be clearer and more intuitive for beginners.

-- 

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/
0
mahotrash (2052)
7/8/2009 2:37:15 PM
On Jul 8, 10:37=A0am, Martin Honnen <mahotr...@yahoo.de> wrote:

> XSLT uses XPath to select nodes and with XPath you can do
> =A0 =A0/AA/BB[CC]
> to select those 'BB' child elements of the 'AA' root element which have
> at least one 'CC' child element.

Thank you, that's exactly what I needed.
I knew what I wanted to do, I just didn't know the XPath syntax.  :)
0
wkrick (35)
7/8/2009 3:19:46 PM
Reply:

Similar Artilces:

select nodes with child node A and child node B
I have an XML document that has multiple childe nodes like the one at the end of this message What syntax would I use with selectNodes to select all viewentry nodes that have an entrydata child node with a name attribute equal to "CourseOrMeetingName" that has a text childe node with the text Course ABC AND that also have an entrydata child with a name attribute equal to Start Date that has a datetime child node with the text 20070110 I was trying something like //viewentry[ (entrydata[@name='CourseOrMeetingName'][text='Course ABC']) and (entrydata[@name='StartDate'][datetime='20070110'])]" <viewentry position="1" unid="E5FE575692CAB4CD852572140052F751" noteid="893A" siblings="24"> <entrydata columnnumber="0" name="CourseOrMeetingName"> <text>Course ABC</text></entrydata> <entrydata columnnumber="1" name="StartDate"> <datetime>20070110</datetime></entrydata> <entrydata columnnumber="2" name="City"> <text>West chester</text></entrydata> <entrydata columnnumber="3" name="FirstName"> <text>Joe</text></entrydata> <entrydata columnnumber="4" name="MiddleName"> <text></text></entrydata> <entrydata columnnumber="5" name="LastName"> <text>...

problem with child text node when constraining other child node types
I'm struggling with whether or not it is possible to represent the following construct in a dtd. I have an element X that I want to contain 3 types of child elements. Child Element A should have a 0 or 1 constraint, Child element B should have a 0-n constraint. I also want X to be able to contain text, resulting in xml that the following <X> <A/> <B/> <B/> child text of element X also possible </X?> I've got the following, but can't seem to figure out a way to also allow for a text child node. Any help appreciated <!ELEMENT X (A?, B*)> Bryan Bryan Ax wrote: > I've got the following, but can't seem to figure out a way to also > allow for a text child node. Any help appreciated Declare X as having mixed content. http://www.w3.org/TR/2004/REC-xml11-20040204/#sec-mixed-content Looking at this, I don't see a way to constrain it so that A only can appear once, whereas B can appear multiple times...I think I'm missing something. Upon further reading, there doesn't appear to be a way to do this. Either I go to mixed-content, which is less constraining, or I need to add a child node to hold the text element. http://www.devguy.com/fp/XML/dtd.htm Bryan Ax wrote: > I have an element X that I want to contain 3 types of child elements. > Child Element A should have a 0 or 1 constraint, Child element B should > have a 0-n constraint. I also want X to be able to contain text, All you can do ...

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

XSLT Child node of a specific node
Hi All, I would like to use XSLT to replace all <u> nodes that are children of a <b> node with a new <heading> node. Also, if the <b> node has no other children than remove it as well. For example: This would be some <b><u>Text</u></b>. It could <b> also maybe be like <u>this</u>...</b> to This would be some <heading>Text</heading>. It could <b> also maybe be like <heading>this</heading>...</b> I've been trying something like: <xsl:template match="//b[u]"> ... </xsl:template> with no success. Could someone point me in the right direction? Thanks! On 2006-10-20, gregmcmullinjr@gmail.com <gregmcmullinjr@gmail.com> wrote: > Hi All, > > I would like to use XSLT to replace all <u> nodes that are children of > a <b> node with a new <heading> node. Also, if the <b> node has no > other children than remove it as well. > For example: > > > This would be some <b><u>Text</u></b>. It could <b> also maybe be like ><u>this</u>...</b> > > to > > This would be some <heading>Text</heading>. It could <b> also maybe be > like <heading>this</heading>...</b> > > I've been trying something like: > ><xsl:template match="//b[u]"> > ... ></xsl:template&...

Get XML values from nodes and child nodes
Hi everybody. My XML file is: <Locatore> <NumeroProgressivo>001</NumeroProgressivo> <CodiceFiscale>CSTNDA69P90H523R</CodiceFiscale> <PersoneFisiche> <Cognome>CAST</Cognome> <Nome>NADIR</Nome> <Sesso>F</Sesso> <DataNascita>10091979</DataNascita> <ComuneNascita>RONCA</ComuneNascita> <ProvinciaNascita>BL</ProvinciaNascita> </PersoneFisiche> </Locatore> <Locatore> <NumeroProgressivo>002</NumeroProgressivo> <CodiceFiscale>PRSGRI74L29F443L</CodiceFiscale> <PersoneFisiche> <Cognome>PERISSI</Cognome> <Nome>IGOR</Nome> <Sesso>M</Sesso> <DataNascita>29071970</DataNascita> <ComuneNascita>MONTE</ComuneNascita> <ProvinciaNascita>SA</ProvinciaNascita> </PersoneFisiche> </Locatore> I need to get in ONE RECORD, both node value and his child nodes values, like this 001 | CSTNDA69P90H523R | CAST | NADIR | F | 10091979 | RONCA | BL 002 | PRSGRI74L29F443L | PERISSI | IGOR | M | 29071970 | MONTE | SA ..... With this: SELECT X.valore.query('NumeroProgressivo').value('.', 'VARCHAR(20)') as NumeroProgressivo, X.valore.query('CodiceFiscale').value('.', 'VARCHAR(16)') as CodiceFiscale FROM Tbulk CROSS APPLY Tbulk.nodes('Fornitura/Documento/S...

Selecting Nodes Using Subtotal of Child Nodes
I'm having difficulty finding the correct syntax that will allow me to select a group of invoices based on the total of an amount column located in its line items. Below are simplified examples of my XML and XSLT files: XML FILE <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="OutstandingInvoiceBalances.xslt"?> <ProgramData> <Invoices> <InvoiceID>1</InvoiceID> <InvoiceNumber>100</InvoiceNumber> <Amount>1000.00</Amount> </Invoices> <Invoices> <InvoiceID>2</InvoiceID> <InvoiceNumber>101</InvoiceNumber> <Amount>2000.00</Amount> </Invoices> <Invoices> <InvoiceID>3</InvoiceID> <InvoiceNumber>102</InvoiceNumber> <Amount>3000.00</Amount> </Invoices> <InvoiceLineItems> <InvoiceLineItemID>1</InvoiceLineItemID> <InvoiceID>1</InvoiceID> <AmountToPay>0</AmountToPay> </InvoiceLineItems> <InvoiceLineItems> <InvoiceLineItemID>2</InvoiceLineItemID> <InvoiceID>2</InvoiceID> <AmountToPay>100</AmountToPay> </InvoiceLineItems> <InvoiceLineItems> <InvoiceLineItemID>3</InvoiceLineItemID> <InvoiceID>2</InvoiceID> <AmountToPay>200</AmountToP...

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

selecting nodes between other nodes
Hi! <root> <foo>bar</foor> <blah /> <blah2 /> <a> <b /> <c /> </> </root> I want to select everything between <foo> and <a>. Is this possible? Timo In article <2jbjjhFvf4ttU1@uni-berlin.de>, Timo Nentwig <tcn@spamgourmet.org> wrote: % <root> % <foo>bar</foor> % <blah /> % <blah2 /> % <a> % <b /> % <c /> % </> % </root> % I want to select everything between <foo> and <a>. Is this possible? How about <xsl:stylesheet xmlns:xsl = 'http://www.w3.org/1999/XSL/Transform' version = '1.0'> <xsl:template match='*[preceding-sibling::foo and following-sibling::a]'> <xsl:copy-of select = '.'/> </xsl:template> <xsl:template match='text()'/> </xsl:stylesheet> ? -- Patrick TJ McPhee East York Canada ptjm@interlog.com ...

XSL HOWDOI use attribute of current node to select a different node?
I know I can select a node by attribute value using something like <xsl:apply-templates select="//*[@Name='Joe']"/> How can I replace Joe with an attribute from the current node? I.e., the current node has an attribute Manager="Fred". I want a select expression something like "//*[@Name='"<xsl:value-of select="@Manager"/>"']" This gives me the text I want, but I can't figure out how to embed it into the xsl:apply-templates' select. I.e., the following won't work; <xsl:apply-template...

Select nodes where an attribute contains some sub-text
Can I use the contains() function within an xpath query to return a node whose attribute contains some text? Something like: selectNodes("//Dataset[@Pattern contains(@Pattern, 'xyz')] so for the given xml doc <root> <Datasets> <Dataset name="dataset1" Pattern="abc" AnotherAttribute="xyz"/> <Dataset name="dataset2" Pattern="xyz" AnotherAttribute="xyz"/> <Dataset name="dataset3" Pattern="vwxyz"/> </Datasets> </root> The nodes dataset2 and dataset3 would be returned because their 'Pattern' attribute contains the text 'xyz'. Many thanks, Duncan. Duncan wrote: > Can I use the contains() function within an xpath query to return a > node whose attribute contains some text? Yes. > Something like: selectNodes("//Dataset[@Pattern contains(@Pattern, > 'xyz')] That is syntactically wrong. A possible XPath expression could be /root/Datasets/Dataset[contains(@Pattern, 'xyz')] -- Martin Honnen http://JavaScript.FAQTs.com/ By jove, it works! Thanks, Duncan. ...

XSL to flatten selective node in XML Doc
I've seen a few XSL examples to flatten a specific node, but none that address this specific scenario: Given the following generic XML: <DocElement> <A attr="attribForA">TextForA</A> <B>TextForB</B> <C> <D>TextForD1</D> <E>TextForE1</E> </C> <C> <D>TextForD2</D> <E> <F>TextForF</F> </E> </C> </DocElement> XSL should transform it at a designated node (example <C>) and flatten any all all (all is important) children to the following: <DocElement> <A attr="attribForA">TextForA</A> <B>TextForB</B> <C_D>TextForD1</C_D> <C_E>TextForE1</C_E> <C_E_F>TextForF</C_E_F> <!-- Continue on in this fashion as deep as the tree goes --> </DocElement> I've struggled with dynamically creating the new elements as a "_" delimitted concatenation of all the child elements. Any and all help would be appreciated. Mario something like this: flat.xml ======== <DocElement> <A attr="attribForA">TextForA</A> <B>TextForB</B> <C> <D>TextForD1</D> <E>TextForE1</E> </C> <C> <D>TextForD2</D> <E> ...

xsl stylesheet problem selecting specific nodes
Ok, I'm sure the answer is right in front of me, but I can't see if for the life of me. Here's my xml document: <price_guide> <group><name>Wacky Widgets</name> <product> <product_id>1</product_id> <description>Widget 1</description> <sell> <quantity>500</quantity> <price>25.50</qunatity> </sell> <sell> <quantity>1000</quantity> <price>34.20</price> </sell> </product> <!-- Multiple producst here--> </group> <group><name>Cool Computers</name> <product> <product_id>2</product_id> <description>Computer 1</description> <sell> <quantity>500</quantity> <price>50.43</price> </sell> <sell> <quantity>1000</quantity> <price>83.10</price> </sell> <sell> <quantity>2500</quantity> <price>160.76</price> </sell> </product> </group> </price_guide> Now, I want a stylesheet that takes each group and puts it in a separate HTML table with the Name as an <h2> header and Product ID, Description, and each quantity as a Column header. Apparently there are too many "for-each" loops in this for my small brain to handle. What I'm getting is that is makes a table for each group containing every product in every group, rather than every product in that particu...

select XML node containing a matching string
I've an XML file as follows. <?xml version="1.0"?> <packet> <proto name="bootp" size="272" pos="46"> <field name="bootp.type" size="1" pos="46" show="1" value="01"/></ field> <field show="Agent Circuit ID: 3031323334" size="7" pos="310" value="01053031323334"/></field> </proto> <packet> I want to select a node in this tree where node field[show] has a string that contains string "Agent Circuit ID". How can I do it using javascript and xmlDoc.selectSingleNode function? I tried using //field[@show=~"Agent Circuit ID"] and // field[contains(@show,'Agent Circuit ID')], but '=~' and 'contains' are not recognised within javascript. thanks in advance. Saurabh pal.saurabh@gmail.com wrote: > I've an XML file as follows. > > <?xml version="1.0"?> > <packet> > <proto name="bootp" size="272" pos="46"> > <field name="bootp.type" size="1" pos="46" show="1" value="01"/></ > field> > <field show="Agent Circuit ID: 3031323334" size="7" pos="310" > value="01053031323334"/></field> > </proto> > <packet> That ...

XML Node, HTML Node
hi guys, how can distinguish between XML Node and HTML Node, using attributes or method .. thanks . alhalayqa wrote: > how can distinguish between XML Node and HTML Node, using attributes or > method .. In the XML DOM nodes do not have an id property or a className property while in the HTML DOM nodes do have those properties. On the other hand there are specializations of the XML DOM like the SVG DOM where id or className are properties too. Thus if you parse XML with namespaces with browsers like Mozilla or Opera the parser recognizes namespaces like the XHTML 1 namespace o...

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

select only the first node from a for-each loop that contains a specific element
How do I select only the first node from a for-each loop that contains a the element "photo". the following xsl finds all "art" elements that have a "photo" element. The problem is that I only want to output the first found result. The way I've written the xsl I get a couple "photo" elements. Here's my xsl: <xsl:template match="/topixfeed"> <!--some additional stuff happens here that finds the parent of all "art" elements--> <xsl:for-each select="art"> <xsl:choose> <xsl:when test='photo'> <h3><xsl:number/><xsl:value-of select="title"/></h3> </xsl:when> </xsl:choose> </xsl:for-each> </div> </xsl:template> Thanks for any help...mt martin.tschofen@gmail.com wrote: > How do I select only the first node from a for-each loop that contains > a the element "photo". > > the following xsl finds all "art" elements that have a "photo" element. > The problem is that I only want to output the first found result. The > way I've written the xsl I get a couple "photo" elements. > Here's my xsl: > > <xsl:template match="/topixfeed"> > <!--some additional stuff happens here that finds the parent of all > "art" elements--> > <xsl:for-each select="art&qu...

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

need a help to create XML node with text and sub child.
Hi folks I need a help to create XML node with text and sub child. -------------------------------------------------------- I want to create "ADDR" node with text and child node. (First child node and then text.) <?xml version="1.0" encoding="UTF-8" ?> - <ROOT> - <NODE> <child-1 attr="attr-value">This is child text</child-1> - <ADDR> <postcode>12345</postcode> Address information </ADDR> </NODE> </ROOT> -------------------------------------------------------- I can create "ADDR" node with text and child node. But first text and then child node. I can not change the location of text and child node of "ADDR" node. <?xml version="1.0" encoding="UTF-8" ?> - <ROOT> - <NODE> <child-1 attr="attr-value">This is child text</child-1> - <ADDR> Address information <postcode>12345</postcode> </ADDR> </NODE> </ROOT> ------------------------------------------------------------------------------------ This is code which I did (ASP) ------------------------------------------------------------------------------------ Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM") If (xmlDoc.childNodes.length = 0) Then Set objProcInstr = xmlDoc.createProcessingInstruction("xml", "version=""1.0"" encoding...

XML XSL javascript, sorting child node of data island
I've been working on this for over a week now, and just can't get this figured out. Hoping one of you gurus can help me out here. I have an xml data island that I'm representing on an htm page as an expandable menu. Got that working, but now I need to add sorting and searching abilities to the menu. I am hoping to do this with xsl but can't get it to work. Is this because of the way I've formed my xml, having the children within the parent elements? Or is my xml alright but my xsl is mis formed. If you could help me figure out how to simply have xsl sort the list, I'...

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

Child Nodes Selection
Hi all, Is it possible to 'cherry-pick' child nodes but retain their parentage. Given an example... <user> <first_name>George</first_name> <sur_name>George</sur_name> <dob>George</dob> <title>Line Manager</title> </user> I would like to obtain a node-set that gives me... <user> <first_name>George</first_name> <sur_name>George</sur_name> </user> I am trying to achieve this is a single XPATH expression, creating a variable to hold my new smaller node-set. I am trying to make my stylesheets less memory intensive by only focusing on those elements I am interested. Effectively working with smaller records. Any assistance is very appreciated, Bryan Galvin In article <971bc529.0410080743.6792128d@posting.google.com>, Bryan Galvin <bryan_galvin@hotmail.com> wrote: >Is it possible to 'cherry-pick' child nodes but retain their >parentage. No. >I am trying to achieve this is a single XPATH expression XPath is a way of identifying (by "paths") nodes in a document. It can never return a node that is not in the input. You need to create a new element with the children you want, or modify an existing node, and XPath cannot do either of these things. -- Richard Richard, As I suspected. From all my experience of XPATH and XSLT I could not see how it was feasable. I have embarked on an alternative path where the nodes I requi...

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

Extracting the first child node of a parent node
Hei, I have the following xml file and I have tried to write xslt to extract only the values of the first "record" node. It does not work. I need some help. I used ---- to represent indent. Xml: <?xml version="1.0" encoding="UTF-8"?> <OAI-PMH xmlns="http://www.openarchives.....OAI/2.0/OAI-PMH.xsd"> ---<responseDate>2008-02-19T12:54:06Z</responseDate> ---<request xmlns="" verb="ListRecords" ......o.no</request> ---<ListRecords xmlns=""> -----<record> <!----the first record node I want to extract --> -------<header> ----------<identifier>oai:frida.uio.no:110517</identifier> ----------<datestamp>2004-12-16</datestamp> ----------<setSpec>UITT</setSpec> -------</header> ..... -----</record> <!-- end of the first record node I want to extract ---> -----<record> .......... -----</record> ........... ---</ListRecords> </OAI-PMH> xslt: <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"> <xsl:template match="/ListRecords" > <xsl:apply-templates select="child::node()[1]"/> </xsl:template> <xsl:template match="record"> <xsl:value-of select="*" /...

Web resources about - XSL select only nodes which contain a specific child node - comp.text.xml

Specific - Wikipedia, the free encyclopedia
Specific Pathogen Free , of a laboratory animal guaranteed free of particular (i.e., specific and named) pathogens "Specific" generally means ...

Specific activity - Wikipedia, the free encyclopedia
... SI quantity related to the phenomenon of natural and artificial radioactivity. The SI unit of "activity" is becquerel, Bq, while that of "specific ...

Post Planner Launches Time Zone-Specific Facebook Posting Feature
So your company is based in San Francisco, but you’ve got a big fan base in Berlin. Posting to your Facebook page at 3 p.m. from California means ...

New gender non-specific birth certificates for the ACT
Parents can now choose to be known as &quot;mother&quot; or &quot;father&quot; or neither, regardless of their sex

Twitter launches Moments in Australia to collect tweets around specific events
Twitter has begun rolling out its Moments feature in Australia, offering a new, more curated way to discover trending content and keep tabs on ...

Barclays gets more specific on belated adoption of Apple Pay in UK: coming in March
... it would be going ahead but couldn’t say when, before stating that it would be sometime in “early 2016.” The bank has now provided more specific ...

Clinton, Sanders spar over specifics in Iowa
The Democratic candidates squared off on their vision and experience at a town hall in Des Moines

Endpoint specific malware renders signature detection useless
Signature-based security could be virtually useless as 97 percent of malware is unique to a specific endpoint says a new report. This is among ...

Reporter Took Orders from Hillary Clinton’s Staff, Down to Specific Adjective
Reporter Took Orders from Hillary Clinton's Staff, Down to Specific Adjective

This year's Oscars are being presented in a very specific order — here’s why
The Oscars approached the night's awards in a pretty cool way: It handed out the awards in a way that mimics the making of a film. Right before ...

Resources last updated: 3/13/2016 9:20:04 PM