Bug 52888 - having a xsi:schemaLocation on fo:root throws a ValidationException
Summary: having a xsi:schemaLocation on fo:root throws a ValidationException
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 1.0
Hardware: PC Windows Vista
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 15:41 UTC by Xavier Dury
Modified: 2012-04-30 00:11 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Dury 2012-03-12 15:41:50 UTC
Hi, I'm developping a FOP extension and I would like to use a schema to indicate which attributes/elements are optional/mandatory but as soon as I specify a xsi:schemaLocation on my fo:root, I get the following exception:

org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:root": xsi:schemaLocation (See position 4:143)
	at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
	at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:54)
	at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
	at $Proxy4.invalidProperty(Unknown Source)
	at org.apache.fop.fo.PropertyList.handleInvalidProperty(PropertyList.java:470)
	at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:334)
	at org.apache.fop.fo.FObj.processNode(FObj.java:119)
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:282)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)



[fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:my-extension="urn:fop-ext:my-extension" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:fop-ext:my-extension my-extension.xsd"]...[/fo:root]

Regards,

Xavier
Comment 1 Glenn Adams 2012-04-07 01:44:39 UTC
resetting P2 open bugs to P3 pending further review
Comment 2 Glenn Adams 2012-04-08 04:17:46 UTC
not a bug; if you want to ignore attributes with a specific namespace, then use FopFactory.ignoreNamespace();

if you feel there should be another way to specify namespaces to ignore, e.g., by a configuration file or command line option, then file an enhancement bug requesting the addition of such a feature;

even better, submit a patch that implements such a feature along with such an enhancement request;
Comment 3 Glenn Adams 2012-04-30 00:11:27 UTC
batch transition resolved+invalid to closed+invalid