mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+1
-1
@@ -198,7 +198,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
|
||||
assert !myDisposed;
|
||||
Application application = ApplicationManager.getApplication();
|
||||
application.assertIsDispatchThread();
|
||||
assert !application.isWriteAccessAllowed();
|
||||
assert !application.isWriteAccessAllowed() : "Write access is required";
|
||||
|
||||
// pump first so that queued event do not interfere
|
||||
UIUtil.dispatchAllInvocationEvents();
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
|
||||
xmlns:er='urn:oasis:names:tc:entity:xmlns:xml:catalog'
|
||||
targetNamespace='urn:oasis:names:tc:entity:xmlns:xml:catalog'
|
||||
elementFormDefault='qualified'>
|
||||
|
||||
<!-- $Id: catalog.xsd 226060 2003-04-22 14:53:32Z ndw $ -->
|
||||
|
||||
<xs:simpleType name='pubIdChars'>
|
||||
<!-- A string of the characters defined as pubIdChar in production 13
|
||||
of the Second Edition of the XML 1.0 Recommendation. Does not include
|
||||
the whitespace characters because they're normalized by XML parsing. -->
|
||||
<xs:restriction base='xs:string'>
|
||||
<xs:pattern value="[a-zA-Z0-9-'()+,./:=?;!*#@$_%]*"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name='publicIdentifier'>
|
||||
<xs:restriction base='er:pubIdChars'/>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name='partialPublicIdentifier'>
|
||||
<xs:restriction base='er:pubIdChars'/>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name='systemOrPublic'>
|
||||
<xs:restriction base='xs:string'>
|
||||
<xs:enumeration value='system'/>
|
||||
<xs:enumeration value='public'/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- The global attribute xml:base is not explicitly declared; -->
|
||||
<!-- it is allowed by the anyAttribute declarations. -->
|
||||
|
||||
<xs:complexType name='catalog'>
|
||||
<xs:choice minOccurs='1' maxOccurs='unbounded'>
|
||||
<xs:element ref='er:public'/>
|
||||
<xs:element ref='er:system'/>
|
||||
<xs:element ref='er:uri'/>
|
||||
<xs:element ref='er:rewriteSystem'/>
|
||||
<xs:element ref='er:rewriteURI'/>
|
||||
<xs:element ref='er:delegatePublic'/>
|
||||
<xs:element ref='er:delegateSystem'/>
|
||||
<xs:element ref='er:delegateURI'/>
|
||||
<xs:element ref='er:nextCatalog'/>
|
||||
<xs:element ref='er:group'/>
|
||||
<xs:any namespace='##other' processContents='skip'/>
|
||||
</xs:choice>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:attribute name='prefer' type='er:systemOrPublic'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='public'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="publicId" type="er:publicIdentifier"
|
||||
use="required"/>
|
||||
<xs:attribute name="uri" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='system'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="systemId" type="xs:string"
|
||||
use="required"/>
|
||||
<xs:attribute name="uri" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='uri'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="name" type="xs:anyURI"
|
||||
use="required"/>
|
||||
<xs:attribute name="uri" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='rewriteSystem'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="systemIdStartString"
|
||||
type="xs:string"
|
||||
use="required"/>
|
||||
<xs:attribute name="rewritePrefix" type="xs:string" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='rewriteURI'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="uriIdStartString"
|
||||
type="xs:string"
|
||||
use="required"/>
|
||||
<xs:attribute name="rewritePrefix" type="xs:string" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='delegatePublic'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="publicIdStartString"
|
||||
type="er:partialPublicIdentifier"
|
||||
use="required"/>
|
||||
<xs:attribute name="catalog" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='delegateSystem'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="systemIdStartString"
|
||||
type="xs:string"
|
||||
use="required"/>
|
||||
<xs:attribute name="catalog" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='delegateURI'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="uriStartString"
|
||||
type="xs:string"
|
||||
use="required"/>
|
||||
<xs:attribute name="catalog" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='nextCatalog'>
|
||||
<xs:complexContent>
|
||||
<xs:restriction base="xs:anyType">
|
||||
<xs:attribute name="catalog" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:restriction>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name='group'>
|
||||
<xs:choice minOccurs='1' maxOccurs='unbounded'>
|
||||
<xs:element ref='er:public'/>
|
||||
<xs:element ref='er:system'/>
|
||||
<xs:element ref='er:uri'/>
|
||||
<xs:element ref='er:rewriteSystem'/>
|
||||
<xs:element ref='er:rewriteURI'/>
|
||||
<xs:element ref='er:delegatePublic'/>
|
||||
<xs:element ref='er:delegateSystem'/>
|
||||
<xs:element ref='er:delegateURI'/>
|
||||
<xs:element ref='er:nextCatalog'/>
|
||||
<xs:any namespace='##other' processContents='skip'/>
|
||||
</xs:choice>
|
||||
<xs:attribute name='prefer' type='er:systemOrPublic'/>
|
||||
<xs:attribute name='id' type='xs:ID'/>
|
||||
<xs:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="catalog" type="er:catalog"/>
|
||||
<xs:element name="public" type="er:public"/>
|
||||
<xs:element name="system" type="er:system"/>
|
||||
<xs:element name="uri" type="er:uri"/>
|
||||
<xs:element name="rewriteSystem" type="er:rewriteSystem"/>
|
||||
<xs:element name="rewriteURI" type="er:rewriteURI"/>
|
||||
<xs:element name="delegatePublic" type="er:delegatePublic"/>
|
||||
<xs:element name="delegateSystem" type="er:delegateSystem"/>
|
||||
<xs:element name="delegateURI" type="er:delegateURI"/>
|
||||
<xs:element name="nextCatalog" type="er:nextCatalog"/>
|
||||
<xs:element name="group" type="er:group"/>
|
||||
|
||||
</xs:schema>
|
||||
@@ -60,7 +60,7 @@ public abstract class ExternalResourceManagerEx extends ExternalResourceManager
|
||||
public abstract void setDefaultHtmlDoctype(@NotNull String defaultHtmlDoctype, @NotNull Project project);
|
||||
|
||||
public abstract String getCatalogPropertiesFile();
|
||||
public abstract void setCatalogPropertiesFile(String filePath);
|
||||
public abstract void setCatalogPropertiesFile(@Nullable String filePath);
|
||||
|
||||
public abstract long getModificationCount(@NotNull Project project);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,10 @@ public class ExternalResourceManagerImpl extends ExternalResourceManagerEx imple
|
||||
if (result == null) {
|
||||
result = getStdResource(url, version);
|
||||
}
|
||||
// getCatalogManager().getCatalog().resolveURI()
|
||||
XMLCatalogManager manager = getCatalogManager();
|
||||
if (manager != null) {
|
||||
result = manager.resolve(url);
|
||||
}
|
||||
if (result == null) {
|
||||
result = url;
|
||||
}
|
||||
@@ -446,6 +449,7 @@ public class ExternalResourceManagerImpl extends ExternalResourceManagerEx imple
|
||||
public void setCatalogPropertiesFile(String filePath) {
|
||||
myCatalogManager = null;
|
||||
myCatalogPropertiesFile = filePath;
|
||||
myModificationCount++;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -46,6 +46,8 @@ public class InternalResourceProvider implements StandardResourceProvider{
|
||||
impl.addInternalResource("http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd","xhtml1-frameset.dtd");
|
||||
impl.addInternalResource("http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd","xhtml11/xhtml11.dtd");
|
||||
|
||||
impl.addInternalResource("urn:oasis:names:tc:entity:xmlns:xml:catalog", "catalog.xsd");
|
||||
|
||||
// Plugins DTDs // stathik
|
||||
impl.addInternalResource("http://plugins.intellij.net/plugin.dtd", "plugin.dtd");
|
||||
impl.addInternalResource("http://plugins.intellij.net/plugin-repository.dtd", "plugin-repository.dtd");
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.openapi.options.BaseConfigurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.options.SearchableConfigurable;
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -70,6 +71,11 @@ public class XMLCatalogConfigurable extends BaseConfigurable implements Searchab
|
||||
myPropertyFile.setText(ExternalResourceManagerEx.getInstanceEx().getCatalogPropertiesFile());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return !Comparing.equal(ExternalResourceManagerEx.getInstanceEx().getCatalogPropertiesFile(), myPropertyFile.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeUIResources() {
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.xml;
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.javaee.ExternalResourceManagerEx;
|
||||
import com.intellij.javaee.XMLCatalogManager;
|
||||
import com.intellij.testFramework.IdeaTestCase;
|
||||
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
|
||||
@@ -23,6 +25,7 @@ import org.apache.xml.resolver.CatalogManager;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
@@ -54,10 +57,33 @@ public class XMLCatalogManagerTest extends LightPlatformCodeInsightFixtureTestCa
|
||||
assertTrue(resolve, resolve.endsWith("/catalog/xhtml1-strict.dtd"));
|
||||
}
|
||||
|
||||
public void testHighlighting() {
|
||||
myFixture.configureByFile("policy.xml");
|
||||
List<HighlightInfo> infos = myFixture.doHighlighting();
|
||||
assertEquals("urn:oasis:names:tc:xacml:1.0:policy", infos.get(0).text);
|
||||
}
|
||||
|
||||
public void testFixedHighlighting() throws Exception {
|
||||
myFixture.configureByFile("policy.xml");
|
||||
try {
|
||||
ExternalResourceManagerEx.getInstanceEx().setCatalogPropertiesFile(getTestDataPath() + "catalog.properties");
|
||||
List<HighlightInfo> infos = myFixture.doHighlighting();
|
||||
assertEquals(infos.toString(), 0, infos.size());
|
||||
}
|
||||
finally {
|
||||
ExternalResourceManagerEx.getInstanceEx().setCatalogPropertiesFile(null);
|
||||
}
|
||||
}
|
||||
|
||||
private XMLCatalogManager getManager() throws IOException {
|
||||
return new XMLCatalogManager(getTestDataPath() + "catalog.properties");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isWriteActionRequired() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/xml/tests/testData/catalog/";
|
||||
|
||||
@@ -6,4 +6,6 @@
|
||||
uri="xhtml1-strict.dtd"/>
|
||||
<system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
uri="xhtml1-strict.dtd"/>
|
||||
<system systemId="urn:oasis:names:tc:xacml:1.0:policy"
|
||||
uri="catalog/cs-xacml-schema-policy-01.xsd"/>
|
||||
</catalog>
|
||||
@@ -0,0 +1,250 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema targetNamespace="urn:oasis:names:tc:xacml:1.0:policy" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xacml="urn:oasis:names:tc:xacml:1.0:policy" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<!-- -->
|
||||
<xs:element name="PolicySet" type="xacml:PolicySetType"/>
|
||||
<xs:complexType name="PolicySetType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:Description" minOccurs="0"/>
|
||||
<xs:element ref="xacml:PolicySetDefaults" minOccurs="0"/>
|
||||
<xs:element ref="xacml:Target"/>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="xacml:PolicySet"/>
|
||||
<xs:element ref="xacml:Policy"/>
|
||||
<xs:element ref="xacml:PolicySetIdReference"/>
|
||||
<xs:element ref="xacml:PolicyIdReference"/>
|
||||
</xs:choice>
|
||||
<xs:element ref="xacml:Obligations" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="PolicySetId" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="PolicyCombiningAlgId" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="PolicySetIdReference" type="xs:anyURI"/>
|
||||
<xs:element name="PolicyIdReference" type="xs:anyURI"/>
|
||||
<!-- -->
|
||||
<xs:element name="PolicySetDefaults" type="xacml:DefaultsType"/>
|
||||
<xs:element name="PolicyDefaults" type="xacml:DefaultsType"/>
|
||||
<xs:complexType name="DefaultsType">
|
||||
<xs:sequence>
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:XPathVersion"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="XPathVersion" type="xs:anyURI"/>
|
||||
<!-- -->
|
||||
<xs:element name="Policy" type="xacml:PolicyType"/>
|
||||
<xs:complexType name="PolicyType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:Description" minOccurs="0"/>
|
||||
<xs:element ref="xacml:PolicyDefaults" minOccurs="0"/>
|
||||
<xs:element ref="xacml:Target"/>
|
||||
<xs:element ref="xacml:Rule" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element ref="xacml:Obligations" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="PolicyId" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="RuleCombiningAlgId" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Description" type="xs:string"/>
|
||||
<!-- -->
|
||||
<xs:element name="Rule" type="xacml:RuleType"/>
|
||||
<xs:complexType name="RuleType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:Description" minOccurs="0"/>
|
||||
<xs:element ref="xacml:Target" minOccurs="0"/>
|
||||
<xs:element ref="xacml:Condition" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="RuleId" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="Effect" type="xacml:EffectType" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:simpleType name="EffectType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Permit"/>
|
||||
<xs:enumeration value="Deny"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<!-- -->
|
||||
<xs:element name="Target" type="xacml:TargetType"/>
|
||||
<xs:complexType name="TargetType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:Subjects"/>
|
||||
<xs:element ref="xacml:Resources"/>
|
||||
<xs:element ref="xacml:Actions"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Subjects" type="xacml:SubjectsType"/>
|
||||
<xs:complexType name="SubjectsType">
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:Subject" maxOccurs="unbounded"/>
|
||||
<xs:element ref="xacml:AnySubject"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Subject" type="xacml:SubjectType"/>
|
||||
<xs:complexType name="SubjectType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:SubjectMatch" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="AnySubject"/>
|
||||
<!-- -->
|
||||
<xs:element name="Resources" type="xacml:ResourcesType"/>
|
||||
<xs:complexType name="ResourcesType">
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:Resource" maxOccurs="unbounded"/>
|
||||
<xs:element ref="xacml:AnyResource"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="AnyResource"/>
|
||||
<!-- -->
|
||||
<xs:element name="Resource" type="xacml:ResourceType"/>
|
||||
<xs:complexType name="ResourceType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:ResourceMatch" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Actions" type="xacml:ActionsType"/>
|
||||
<xs:complexType name="ActionsType">
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:Action" maxOccurs="unbounded"/>
|
||||
<xs:element ref="xacml:AnyAction"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="AnyAction"/>
|
||||
<!-- -->
|
||||
<xs:element name="Action" type="xacml:ActionType"/>
|
||||
<xs:complexType name="ActionType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:ActionMatch" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="SubjectMatch" type="xacml:SubjectMatchType"/>
|
||||
<xs:complexType name="SubjectMatchType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:AttributeValue"/>
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:SubjectAttributeDesignator"/>
|
||||
<xs:element ref="xacml:AttributeSelector"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="MatchId" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="ResourceMatch" type="xacml:ResourceMatchType"/>
|
||||
<xs:complexType name="ResourceMatchType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:AttributeValue"/>
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:ResourceAttributeDesignator"/>
|
||||
<xs:element ref="xacml:AttributeSelector"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="MatchId" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="ActionMatch" type="xacml:ActionMatchType"/>
|
||||
<xs:complexType name="ActionMatchType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:AttributeValue"/>
|
||||
<xs:choice>
|
||||
<xs:element ref="xacml:ActionAttributeDesignator"/>
|
||||
<xs:element ref="xacml:AttributeSelector"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="MatchId" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="AttributeSelector" type="xacml:AttributeSelectorType"/>
|
||||
<xs:complexType name="AttributeSelectorType">
|
||||
<xs:attribute name="RequestContextPath" type="xs:string" use="required"/>
|
||||
<xs:attribute name="DataType" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="MustBePresent" type="xs:boolean" use="optional" default="false"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="ResourceAttributeDesignator" type="xacml:AttributeDesignatorType"/>
|
||||
<xs:element name="ActionAttributeDesignator" type="xacml:AttributeDesignatorType"/>
|
||||
<xs:element name="EnvironmentAttributeDesignator" type="xacml:AttributeDesignatorType"/>
|
||||
<!-- -->
|
||||
<xs:complexType name="AttributeDesignatorType">
|
||||
<xs:attribute name="AttributeId" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="DataType" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="Issuer" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="MustBePresent" type="xs:boolean" use="optional" default="false"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="SubjectAttributeDesignator" type="xacml:SubjectAttributeDesignatorType"/>
|
||||
<xs:complexType name="SubjectAttributeDesignatorType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="xacml:AttributeDesignatorType">
|
||||
<xs:attribute name="SubjectCategory" type="xs:anyURI" use="optional" default="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="AttributeValue" type="xacml:AttributeValueType"/>
|
||||
<xs:complexType name="AttributeValueType" mixed="true">
|
||||
<xs:sequence>
|
||||
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="DataType" type="xs:anyURI" use="required"/>
|
||||
<xs:anyAttribute namespace="##any" processContents="lax"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Function" type="xacml:FunctionType"/>
|
||||
<xs:complexType name="FunctionType">
|
||||
<xs:attribute name="FunctionId" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Apply" type="xacml:ApplyType"/>
|
||||
<xs:element name="Condition" type="xacml:ApplyType"/>
|
||||
<!-- -->
|
||||
<xs:complexType name="ApplyType">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="xacml:Apply"/>
|
||||
<xs:element ref="xacml:Function"/>
|
||||
<xs:element ref="xacml:AttributeValue"/>
|
||||
<xs:element ref="xacml:SubjectAttributeDesignator"/>
|
||||
<xs:element ref="xacml:ResourceAttributeDesignator"/>
|
||||
<xs:element ref="xacml:ActionAttributeDesignator"/>
|
||||
<xs:element ref="xacml:EnvironmentAttributeDesignator"/>
|
||||
<xs:element ref="xacml:AttributeSelector"/>
|
||||
</xs:choice>
|
||||
<xs:attribute name="FunctionId" type="xs:anyURI" use="required"/>
|
||||
<!-- Legal types for the first and subsequent operands are defined in the accompanying table -->
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Obligations" type="xacml:ObligationsType"/>
|
||||
<xs:complexType name="ObligationsType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:Obligation" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="Obligation" type="xacml:ObligationType"/>
|
||||
<xs:complexType name="ObligationType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="xacml:AttributeAssignment" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="ObligationId" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="FulfillOn" type="xacml:EffectType" use="required"/>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
<xs:element name="AttributeAssignment" type="xacml:AttributeAssignmentType"/>
|
||||
<xs:complexType name="AttributeAssignmentType" mixed="true">
|
||||
<xs:complexContent mixed="true">
|
||||
<xs:extension base="xacml:AttributeValueType">
|
||||
<xs:attribute name="AttributeId" type="xs:anyURI" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<!-- -->
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,18 @@
|
||||
<x:PolicySet
|
||||
xmlns:x="urn:oasis:names:tc:xacml:1.0:policy"
|
||||
PolicyCombiningAlgId="" PolicySetId="">
|
||||
<x:Description>xxx</x:Description>
|
||||
<x:Target>
|
||||
<x:Subjects>
|
||||
<x:Subject>
|
||||
<x:SubjectMatch MatchId="">
|
||||
<x:AttributeValue DataType=""/>
|
||||
<x:AttributeSelector RequestContextPath="" DataType=""/>
|
||||
</x:SubjectMatch>
|
||||
</x:Subject>
|
||||
</x:Subjects><x:Resources><x:Resource><x:ResourceMatch MatchId=""><x:AttributeValue
|
||||
DataType=""/><x:AttributeSelector RequestContextPath="" DataType=""/>
|
||||
</x:ResourceMatch></x:Resource></x:Resources>
|
||||
<x:Actions><x:AnyAction/></x:Actions>
|
||||
</x:Target>
|
||||
</x:PolicySet>
|
||||
Reference in New Issue
Block a user