Subject: Re: [xsl] XPath which tests that an element does not have mixed content? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 03 Nov 2011 14:50:06 -0400 |
Would you please recommend an XPath expression which ensures that the content of <author> is optional whitespace, <Person>, optional whitespace, and nothing else:
<author> <Person> <name>Simon L. Peyton Jones</name> </Person> </author>
The result of the XPath expression is true if the content is as desired and false otherwise. The XPath should return true for the above example and false for the below example:
<author> The person is: <Person> <name>Simon L. Peyton Jones</name> </Person> </author>
-- Contact us for world-wide XML consulting and instructor-led training Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath which tests that an ele, Costello, Roger L. | Thread | Re: [xsl] XPath which tests that an, G. Ken Holman |
[xsl] XPath which tests that an ele, Costello, Roger L. | Date | Re: [xsl] XPath which tests that an, G. Ken Holman |
Month |