xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50498] [PATCH] Reject top-level typed nodes in XMP
Date Tue, 10 Apr 2012 19:31:14 GMT

Glenn Adams <gadams@apache.org> changed:

           What    |Removed                     |Added
             Status|NEW                         |NEEDINFO

--- Comment #2 from Glenn Adams <gadams@apache.org> 2012-04-10 19:31:14 UTC ---
(In reply to comment #1)
> Created attachment 26423 [details]
> Patch to reject top-level typed nodes
> This patch rejects top-level typed nodes with an exception.

+            String about = attributes.getValue(XMPConstants.RDF_NAMESPACE,
+            if (this.contextStack.peek().equals(this.meta) && (about != null))
+                //rdf:RDF is the parent, so this is a top-level item that
+                //an rdf:Description, which isn't allowed.                     
+                throw new SAXException("Top-level element " + qName + " not an
+            }                                                                  

(1) the check this.contextStack.peek().equals(this.meta) would also return true
if xmp:xmpmeta is the parent;

(2) that <!{xmp|rdf}:* rdf:about=""> is the same as 'not an rdf:Description' is
not clear to me; aren't there other possibilities for 'not an rdf:Description'
that do not have rdf:about?

could you update patch accordingly, and also provide junit tests that test this
new functionality both for absence and presence (see

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org

View raw message