You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by bu...@apache.org on 2010/12/19 22:58:40 UTC
DO NOT REPLY [Bug 50498] New: Permits top-level typed nodes in XMP
https://issues.apache.org/bugzilla/show_bug.cgi?id=50498
Summary: Permits top-level typed nodes in XMP
Product: XMLGraphicsCommons
Version: 1.4
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: XMP
AssignedTo: general@xmlgraphics.apache.org
ReportedBy: sandals@crustytoothpaste.net
(This is Debian bug #605940.)
XMP permits only rdf:Description elements directly under rdf:RDF.
libxmlgraphics-commons-java does not enforce this and produces some odd results
in the XMP (it looks like it treats top-level non-Description elements as
properties). These top-level non-rdf:Description elements should either be
rejected or turned into rdf:Description elements with rdf:type properties.
--
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
DO NOT REPLY [Bug 50498] Permits top-level typed nodes in XMP
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50498
--- Comment #1 from brian m. carlson <sa...@crustytoothpaste.net> 2010-12-19 16:59:42 EST ---
Created an attachment (id=26423)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26423)
Patch to reject top-level typed nodes
This patch rejects top-level typed nodes with an exception.
--
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
DO NOT REPLY [Bug 50498] [PATCH] Reject top-level typed nodes in XMP
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50498
Glenn Adams <ga...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Glenn Adams <ga...@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,
"about");
+ if (this.contextStack.peek().equals(this.meta) && (about != null))
{
+ //rdf:RDF is the parent, so this is a top-level item that
isn't
+ //an rdf:Description, which isn't allowed.
+ throw new SAXException("Top-level element " + qName + " not an
rdf:Description");
+ }
(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
test/java/org/apache/xmlgraphics/xmp/XMPParserTest.java)
--
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
DO NOT REPLY [Bug 50498] [PATCH] Reject top-level typed nodes in XMP
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50498
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Permits top-level typed |[PATCH] Reject top-level
|nodes in XMP |typed nodes in XMP
--
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