Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

RE: [jdom-interest] Finding syntactically-related children and parent
 Elements in XHTML

Costas Mantratzis

2005-05-02

Replies:

Thanks Rolf.

I think I'll have to resort to that. I was just wondering if any of the
aforementioned components had such schema understanding built-in.

Thanks for your quick response anyway!
Costas

> -----Original Message-----
> From: Rolf Lear [mailto:rlear@(protected)]
> Sent: 03 May 2005 02:40 AM
> To: 'Costas Mantratzis'; jdom-interest@(protected)
> Subject: RE: [jdom-interest] Finding syntactically-related
> children and parent Elements in XHTML
>
> Use XHTML and investigate schemas....
>
> That's what it's all about, those XML Schema things.
>
> Try http://www.w3.org/TR/xhtml1/
>
> Also, run your XHTML document through a validating parser.
>
> Rolf
>
> -----Original Message-----
> From: jdom-interest-bounces@(protected)
> [mailto:jdom-interest-bounces@(protected)
> Sent: Monday, May 02, 2005 11:54 AM
> To: jdom-interest@(protected)
> Subject: [jdom-interest] Finding syntactically-related children and
> parent Elements in XHTML
>
>
> Hello everyone.
>
> Just picking your brains on something you might have come across while
> playing with JDOM, JTidy or similar components...
>
> I'm trying to get my algorithm to understand which elements are
> syntactically directly related to their parents in an XHTML structure.
>
> For example, I want the system to know that all TD and TR elements are
> directly related to their TABLE parent (i.e. they can't exist
> without it)
> where as for example a P element within a TD is not
> "syntactically directly"
> related to its TD or TR or TABLE parents (i.e. a P can be
> found on its own
> within the XHTML document without always requiring TD to be its parent
> element).
>
> I was wondering if such a relation is easily detectable using
> something like
> JDOM, Jtidy etc.?
>
> I've been experimenting with getDescendants() and
> getChildren() methods but
> both of them return every child or descendant regardless of the direct
> syntactic relation it may have with its parents...
>
> Just wondering if you've ever come across such an issue or
> can think of a
> possible solution...
>
> Been busting my head all day to try to find a "clean" way of
> doing this...
>
> C.
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
rhost.com
>
> This email and any files transmitted with it are confidential and
> proprietary to Algorithmics Incorporated and its affiliates
> ("Algorithmics"). If received in error, use is prohibited.
> Please destroy,
> and notify sender. Sender does not waive confidentiality or
> privilege.
> Internet communications cannot be guaranteed to be timely,
> secure, error or
> virus-free. Algorithmics does not accept liability for any errors or
> omissions. Any commitment intended to bind Algorithmics must
> be reduced to
> writing and signed by an authorized signatory.
>

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.