xsl-list
[Top] [All Lists]

RE: [xsl] Finding Untagged content in XML

2009-02-17 07:18:11

Try:

assert="not(.//text()[contains(.,'Figure')][not(parent::figure)])"/>


Michael Kay
http://www.saxonica.com/
 

-----Original Message-----
From: Ganesh Babu N [mailto:nbabuganesh(_at_)gmail(_dot_)com] 
Sent: 17 February 2009 11:12
To: XSL; SVRL
Subject: [xsl] Finding Untagged content in XML

Dear All,

I am writing a schematron validation in which I want to find 
all untagged content. Suppose Figure 1 is there, it should be 
tagged as

<p>...................... <figure id="F1">Figure 1</figure> 
.....................</p>. If not I should raise an error.

When i use the following expression it is showing the tagged one also.

<assert test="not(contains(.,' Figure'))">

In perl we will write this as [^>]Figure. Please let me know 
how to achieve this in XSLT 2.0.

Regards,
Ganesh

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>