We're trying to test one of the sample xacml policies in Fedora 2.2.1
and cannot get the test file to validate. Does anyone see something
obvious that we might have missed?
Thanks,
Jeffery
Error:
validate-policy.sh rutgers-lib-10833.xml
ERROR [main] (ValidatePolicy.java:123) - couldn't parse repo-wide policy
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'ActionAttributeDesignator'.
One of '{"urn:oasis:names:tc:xacml:1.0:policy":AttributeValue}' is
expected.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException
(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError
(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError
(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator
$XSIErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError
(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement
(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement
(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement
(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.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
at javax.xml.parsers.DocumentBuilder.parse
(DocumentBuilder.java:161)
at fedora.server.security.ValidatePolicy.main
(ValidatePolicy.java:120)
Validation failed
The code section in question:
<Resources>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-
equal">
<AttributeValue
DataType="
http://www.w3.org/2001/XMLSchema#string">DC</AttributeValue>
<ResourceAttributeDesignator
AttributeId="urn:fedora:names:fedora:2.1:resource:datastream:id"
DataType="
http://www.w3.org/2001/XMLSchema#string"/>
</ResourceMatch>
</Resource>
</Resources>