OK, I understand now.  I wasn't trying to validate it against a DTD or a 
schema, I just wanted to know if it was well-formed.  If an element can have 
both child text and child elements (which you confirm is well-formed), and 
Batik accepts it (implying it is valid as SVG), then it appears this pull 
parser is incorrectly interpreting it as improperly formed XML.
 
Michael Bishop

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Fri 7/27/2007 10:00 AM
To: batik-users@xmlgraphics.apache.org
Subject: RE: RE: Batik verus valid XML?



In the XML world, the term "valid" has a specific meaning that connotes a 
document that conforms to a DTD or schema.

The term I believe you want to use here is "well-formed". A well-formed 
document has all attribute values quoted, all elements properly nested, and no 
unclosed elements.

Your example:

<element>child text<childElement>more text</childElement></element>

opens and closes with paired "element" tags. Check
has mixed content (text interspersed with elements). Check
has a matched set of "childElement" tags. Check
no element overlaps any other. Check
no attributes (therefore no non-quoted attribute values). Check.

Your sample is well-formed.
--
Charles Knell
[EMAIL PROTECTED] - email



-----Original Message-----
From:     Bishop, Michael W. CONTR J9C880 <[EMAIL PROTECTED]>
Sent:     Fri, 27 Jul 2007 09:28:37 -0400
To:       <batik-users@xmlgraphics.apache.org>
Subject:  RE: Batik verus valid XML?

I understand that.  I think the problem is with generic XML in general, not a 
specific element.  Omitting namespaces, DTDs, schemas, etc, is this valid XML?

<element>child text<childElement>more text</childElement></element>

I used the <text> element as an example because this is the only instance where 
this occurs in my application.  A <rect>, for example, has no child text, so 
it's not a problem.

Michael Bishop

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thu 7/26/2007 5:12 PM
To: batik-users@xmlgraphics.apache.org
Subject: RE: Batik verus valid XML?



XML doesn't have any "magic tags", so <text> is as meaningful as <djhshf>.

Whether or not a document or element in a document is valid or not depends the 
DTD or xml-schema document you have associated with it. It is not required (by 
XML) to have a DTD or schema document associated with your data document.

--
Charles Knell
[EMAIL PROTECTED] - email



-----Original Message-----
From:     Bishop, Michael W. CONTR J9C880 <[EMAIL PROTECTED]>
Sent:     Thu, 26 Jul 2007 16:50:44 -0400
To:       <batik-users@xmlgraphics.apache.org>
Subject:  Batik verus valid XML?

I've continued to adhere to the SVG 1.1 standard until SVG 1.2 is
finalized.  I'm also using a 1.6 SVN build of Batik as opposed to 1.7b1.
Anyway, I'm applying tooltips to SVG elements, but I've run into a
problem with text elements:

<text>This is some text.<desc>This is a tooltip.</desc></text>

This will render properly in Batik, however, it fails in the XML pull
parser we use for XMPP traffic.  The pull parser expects </text> after
the text content as opposed to a child element.

I don't know which is right.  Is Batik lenient or is this valid XML?  If
it's invalid XML, it appears that tooltips are impossible under SVG 1.1.

I'm trying to figure out who's "wrong"; Batik or the pull parser.

Michael Bishop

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to