LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: Re: Is there a way to limit the # of parsed elements?
From: Peter Flynn <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Wed, 17 Mar 1999 11:33:49 +0000

text/plain (28 lines)

> Being new to XML / XSL, I'm wondering if there's a way to invalidate an
> xml document based on how many times a specific element is parsed?

Interesting idea. **IN**validate? You mean make it spit blood on the
xth pass over the yth <PARA> in the zth <CHAPTER>? Not with existing
parsers, but it would be trivial with a processing language like

   element PARA when parent is CHAPTER
        do when occurrence of element is equal Y
                and occurrence of parent of element is equal Z
                        reset N to file "bar"
                        open foo as "bar"
                        increment N
                        put foo "%d(N)"
                        close foo
                        do when counter N is greater-equal X
                                put #console "Get stuffed%n"
                                put #suppress "%c"
                output "%c"

It's probably just as easy in Perl etc but Omnimark's syntax is simpler.


Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager