diff options
author | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-01-26 16:27:27 +0000 |
---|---|---|
committer | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-01-26 16:27:27 +0000 |
commit | 84cd553cc40d9850fcd865887219d907693af0e6 (patch) | |
tree | 2d1d9054f42845ce951c9b2c2239178c803443d3 /BKUViewer | |
parent | 667af128d0adfeee2aa4748ab58411c91bc4905f (diff) | |
parent | 7a5310b43849124095d97af3103c4fdaeeacbbbb (diff) | |
download | mocca-84cd553cc40d9850fcd865887219d907693af0e6.tar.gz mocca-84cd553cc40d9850fcd865887219d907693af0e6.tar.bz2 mocca-84cd553cc40d9850fcd865887219d907693af0e6.zip |
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/branches/mocca-1.2.11-sha2@602 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUViewer')
61 files changed, 5794 insertions, 0 deletions
diff --git a/BKUViewer/pom.xml b/BKUViewer/pom.xml new file mode 100644 index 00000000..7871b67a --- /dev/null +++ b/BKUViewer/pom.xml @@ -0,0 +1,48 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <artifactId>bku</artifactId> + <groupId>at.gv.egiz</groupId> + <version>1.2.11</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>at.gv.egiz</groupId> + <artifactId>BKUViewer</artifactId> + <name>BKU Viewer</name> + <version>1.2.11</version> + <description /> + <dependencies> + <dependency> + <groupId>at.gv.egiz</groupId> + <artifactId>bkucommon</artifactId> + <version>1.2.11</version> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </dependency> + <dependency> + <groupId>org.w3c</groupId> + <artifactId>css-validator</artifactId> + <version>2.1-mocca</version> + <exclusions> + <exclusion> + <groupId>org.w3c</groupId> + <artifactId>jigsaw</artifactId> + </exclusion> + <exclusion> + <groupId>tagsoup</groupId> + <artifactId>tagsoup</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>at.gv.egiz</groupId> + <artifactId>BKUFonts</artifactId> + <version>1.2</version> + </dependency> + </dependencies> +</project> diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java new file mode 100644 index 00000000..a230afa6 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java @@ -0,0 +1,273 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.nio.charset.Charset; +import java.nio.charset.IllegalCharsetNameException; +import java.nio.charset.UnsupportedCharsetException; +import java.util.Locale; + +import javax.xml.XMLConstants; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.ValidatorHandler; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.xml.sax.Attributes; +import org.xml.sax.ContentHandler; +import org.xml.sax.InputSource; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import at.gv.egiz.bku.slxhtml.css.CSSValidatorSLXHTML; +import at.gv.egiz.bku.viewer.ValidationException; + +public class SLXHTMLValidator implements at.gv.egiz.bku.viewer.Validator { + + /** + * The schema file for the SLXHTML schema. + */ + private static final String SLXHTML_SCHEMA_FILE = "at/gv/egiz/bku/slxhtml/slxhtml.xsd"; +// public static final String[] SLXHTML_SCHEMA_FILES = new String[]{ +// "at/gv/egiz/bku/slxhtml/slxhtml.xsd", +// "at/gv/egiz/bku/slxhtml/slxhtml-model-1.xsd", +// "at/gv/egiz/bku/slxhtml/slxhtml-modules-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-attribs-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-blkphras-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-blkpres-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-blkstruct-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-datatypes-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-framework-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-image-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-inlphras-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-inlpres-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-inlstruct-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-list-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-pres-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-struct-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-style-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-table-1.xsd", +// "at/gv/egiz/bku/slxhtml/xhtml-text-1.xsd", +// "at/gv/egiz/bku/slxhtml/xml.xsd" +// }; + + /** + * Logging facility. + */ + private static Log log = LogFactory.getLog(SLXHTMLValidator.class); + + private static Schema slSchema; + + /** + * Initialize the security layer schema. + */ + private synchronized static void ensureSchema() { + if (slSchema == null) { + try { + SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + ClassLoader cl = SLXHTMLValidator.class.getClassLoader(); + URL schemaURL = cl.getResource(SLXHTML_SCHEMA_FILE); + log.debug("Trying to create SLXHTML schema from URL '" + schemaURL + "'."); + long t0 = System.currentTimeMillis(); + slSchema = schemaFactory.newSchema(schemaURL); + long t1 = System.currentTimeMillis(); + log.debug("SLXHTML schema successfully created in " + (t1 - t0) + "ms."); + } catch (SAXException e) { + log.error("Failed to load security layer XHTML schema.", e); + throw new RuntimeException("Failed to load security layer XHTML schema.", e); + } + + } + } + + public SLXHTMLValidator() { + ensureSchema(); + } + + public void validate(InputStream is, String charset) + throws ValidationException { + if (charset == null) { + validate(is, (Charset) null); + } else { + try { + validate(is, Charset.forName(charset)); + } catch (IllegalCharsetNameException e) { + throw new ValidationException(e); + } catch (UnsupportedCharsetException e) { + throw new ValidationException(e); + } + } + } + + public void validate(InputStream is, Charset charset) throws ValidationException { + + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); + spf.setSchema(slSchema); + spf.setValidating(true); + spf.setXIncludeAware(false); + + SAXParser parser; + try { + parser = spf.newSAXParser(); + } catch (ParserConfigurationException e) { + log.error("Failed to create SLXHTML parser.", e); + throw new RuntimeException("Failed to create SLXHTML parser.", e); + } catch (SAXException e) { + log.error("Failed to create SLXHTML parser.", e); + throw new RuntimeException("Failed to create SLXHTML parser.", e); + } + + InputSource source; + if (charset != null) { + source = new InputSource(new InputStreamReader(is, charset)); + } else { + source = new InputSource(is); + } + + + ValidatorHandler validatorHandler = slSchema.newValidatorHandler(); + + DefaultHandler defaultHandler = new ValidationHandler(validatorHandler); + try { + parser.parse(source, defaultHandler); + } catch (SAXException e) { + if (e.getException() instanceof ValidationException) { + throw (ValidationException) e.getException(); + } else { + throw new ValidationException(e); + } + } catch (IOException e) { + throw new ValidationException(e); + } + + } + + private void validateCss(InputStream is) throws ValidationException { + CSSValidatorSLXHTML cssValidator = new CSSValidatorSLXHTML(); + // TODO: use the right locale + cssValidator.validate(is, Locale.getDefault(), "SLXHTML", 0); + } + + private class ValidationHandler extends DefaultHandler implements ContentHandler { + + private ValidatorHandler validatorHandler; + + private boolean insideStyle = false; + + private StringBuffer style = new StringBuffer(); + + private ValidationHandler(ValidatorHandler contentHandler) { + this.validatorHandler = contentHandler; + } + + @Override + public void endDocument() throws SAXException { + validatorHandler.endDocument(); + } + + @Override + public void endPrefixMapping(String prefix) throws SAXException { + validatorHandler.endPrefixMapping(prefix); + } + + @Override + public void ignorableWhitespace(char[] ch, int start, int length) + throws SAXException { + validatorHandler.ignorableWhitespace(ch, start, length); + } + + @Override + public void processingInstruction(String target, String data) + throws SAXException { + validatorHandler.processingInstruction(target, data); + } + + @Override + public void setDocumentLocator(Locator locator) { + validatorHandler.setDocumentLocator(locator); + } + + @Override + public void skippedEntity(String name) throws SAXException { + validatorHandler.skippedEntity(name); + } + + @Override + public void startDocument() throws SAXException { + validatorHandler.startDocument(); + } + + @Override + public void startPrefixMapping(String prefix, String uri) + throws SAXException { + validatorHandler.startPrefixMapping(prefix, uri); + } + + @Override + public void startElement(String uri, String localName, String name, + Attributes attributes) throws SAXException { + validatorHandler.startElement(uri, localName, name, attributes); + + System.out.println(uri + ":" + localName); + + if ("http://www.w3.org/1999/xhtml".equals(uri) && + "style".equals(localName)) { + insideStyle = true; + } + } + + @Override + public void characters(char[] ch, int start, int length) + throws SAXException { + validatorHandler.characters(ch, start, length); + + if (insideStyle) { + style.append(ch, start, length); + } + + } + + @Override + public void endElement(String uri, String localName, String name) + throws SAXException { + validatorHandler.endElement(uri, localName, name); + + if (insideStyle) { + insideStyle = false; + try { + validateCss(new ByteArrayInputStream(style.toString().getBytes(Charset.forName("UTF-8")))); + } catch (ValidationException e) { + throw new SAXException(e); + } + } + } + + } + + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CSSValidatorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CSSValidatorSLXHTML.java new file mode 100644 index 00000000..7abe4741 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CSSValidatorSLXHTML.java @@ -0,0 +1,95 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Locale; + +import org.w3c.css.css.CssParser; +import org.w3c.css.css.StyleSheet; +import org.w3c.css.css.StyleSheetParser; +import org.w3c.css.parser.CssError; +import org.w3c.css.parser.Errors; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.Util; +import org.w3c.css.util.Warning; +import org.w3c.css.util.Warnings; + +import at.gv.egiz.bku.viewer.ValidationException; + +public class CSSValidatorSLXHTML { + + public void validate(InputStream input, Locale locale, String title, int lineno) throws ValidationException { + + // disable imports + Util.importSecurity = true; + + CssParser cssParser = new StyleSheetParser(); + + ApplContext ac = new ApplContext(locale.getLanguage()); + ac.setCssVersion("slxhtml"); + ac.setMedium("all"); + + URL url; + try { + url = new URL("http://test.xyz"); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + + cssParser.parseStyleElement(ac, input, title, "all", url, lineno); + + StyleSheet styleSheet = cssParser.getStyleSheet(); + + // find conflicts + styleSheet.findConflicts(ac); + + boolean valid = true; + StringBuilder sb = new StringBuilder().append("CSS:"); + + // look for errors + Errors errors = styleSheet.getErrors(); + if (errors.getErrorCount() != 0) { + valid = false; + CssError[] cssErrors = errors.getErrors(); + for (CssError cssError : cssErrors) { + Exception exception = cssError.getException(); + sb.append(" "); + sb.append(exception.getMessage()); + } + } + + // look for warnings + Warnings warnings = styleSheet.getWarnings(); + if (warnings.getWarningCount() != 0) { + valid = false; + Warning[] cssWarnings = warnings.getWarnings(); + for (Warning warning : cssWarnings) { + sb.append(" "); + sb.append(warning.getWarningMessage()); + } + } + + if (!valid) { + throw new ValidationException(sb.toString()); + } + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBackgroundColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBackgroundColorSLXHTML.java new file mode 100644 index 00000000..53191d17 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBackgroundColorSLXHTML.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBackgroundColorCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssBackgroundColorSLXHTML extends CssBackgroundColorCSS2 { + + public CssBackgroundColorSLXHTML() { + } + + public CssBackgroundColorSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + } + + public CssBackgroundColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + super(ac, expression); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBackgroundSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBackgroundSLXHTML.java new file mode 100644 index 00000000..724c8c6a --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBackgroundSLXHTML.java @@ -0,0 +1,93 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/** + * + */ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBackgroundCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +/** + * @author mcentner + * + */ +public class CssBackgroundSLXHTML extends CssBackgroundCSS2 { + + public CssBackgroundSLXHTML() { + } + + public CssBackgroundSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + // The properties for selecting and controlling an image as background + // (background-image, background-repeat, background-position, + // background-attachment; cf. [CSS 2], section 14.2.1) must not be contained + // in an instance document to prevent content from overlapping. Otherwise + // the instance document must be rejected by the Citizen Card Environment. + // + // The property for the shorthand version of the background properties + // (background) should be supported by a Citizen Card Environment. The + // recommended values result from the explanations for the background-color + // property above (cf. [CSS 2], section 14.2.1). If the property contains + // values for selecting and controlling an image as background, the instance + // document must be rejected by the Citizen Card Environment. + + if (getImage() != null) { + throw new SLXHTMLInvalidParamException("background", "background-image", ac); + } + + if (getRepeat() != null) { + throw new SLXHTMLInvalidParamException("background", "background-repeat", ac); + } + + if (getPosition() != null) { + throw new SLXHTMLInvalidParamException("background", "background-position", ac); + } + + if (getAttachment() != null) { + throw new SLXHTMLInvalidParamException("background", "background-attachment", ac); + } + + } + + public CssBackgroundSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderBottomColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderBottomColorSLXHTML.java new file mode 100644 index 00000000..4f5798b0 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderBottomColorSLXHTML.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBorderBottomColorCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssBorderBottomColorSLXHTML extends CssBorderBottomColorCSS2 { + + public CssBorderBottomColorSLXHTML() { + } + + public CssBorderBottomColorSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + } + + public CssBorderBottomColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderColorSLXHTML.java new file mode 100644 index 00000000..3f5a7319 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderColorSLXHTML.java @@ -0,0 +1,81 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBorderBottomColorCSS2; +import org.w3c.css.properties.css1.CssBorderColorCSS2; +import org.w3c.css.properties.css1.CssBorderLeftColorCSS2; +import org.w3c.css.properties.css1.CssBorderRightColorCSS2; +import org.w3c.css.properties.css1.CssBorderTopColorCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssBorderColorSLXHTML extends CssBorderColorCSS2 { + + public CssBorderColorSLXHTML() { + } + + public CssBorderColorSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssBorderTopColorCSS2 top = getTop(); + if (!isSoftlyInherited() && top != null) { + if (CssColorSLXHTML.isDisallowedColor(top.getColor())) { + throw new SLXHTMLInvalidParamException("color", top.getColor(), getPropertyName(), ac); + } + } + + CssBorderLeftColorCSS2 left = getLeft(); + if (!isSoftlyInherited() && left != null) { + if (CssColorSLXHTML.isDisallowedColor(left.getColor())) { + throw new SLXHTMLInvalidParamException("color", left.getColor(), getPropertyName(), ac); + } + } + + CssBorderRightColorCSS2 right = getRight(); + if (!isSoftlyInherited() && right != null) { + if (CssColorSLXHTML.isDisallowedColor(right.getColor())) { + throw new SLXHTMLInvalidParamException("color", right.getColor(), getPropertyName(), ac); + } + } + + CssBorderBottomColorCSS2 bottom = getBottom(); + if (!isSoftlyInherited() && bottom != null) { + if (CssColorSLXHTML.isDisallowedColor(bottom.getColor())) { + throw new SLXHTMLInvalidParamException("color", bottom.getColor(), getPropertyName(), ac); + } + } + + } + + public CssBorderColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderLeftColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderLeftColorSLXHTML.java new file mode 100644 index 00000000..e2378e99 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderLeftColorSLXHTML.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBorderLeftColorCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssBorderLeftColorSLXHTML extends CssBorderLeftColorCSS2 { + + public CssBorderLeftColorSLXHTML() { + } + + public CssBorderLeftColorSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + } + + public CssBorderLeftColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderRightColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderRightColorSLXHTML.java new file mode 100644 index 00000000..99d6bae5 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderRightColorSLXHTML.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBorderRightColorCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssBorderRightColorSLXHTML extends CssBorderRightColorCSS2 { + + public CssBorderRightColorSLXHTML() { + } + + public CssBorderRightColorSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + } + + public CssBorderRightColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderSLXHTML.java new file mode 100644 index 00000000..ac32670e --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderSLXHTML.java @@ -0,0 +1,85 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBorderCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssBorderSLXHTML extends CssBorderCSS2 { + + public CssBorderSLXHTML() { + } + + public CssBorderSLXHTML(ApplContext ac, CssExpression value, boolean check) + throws InvalidParamException { + super(ac, value, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + if (getTop() != null) { + CssValue top = getTop().getColor(); + if (!isSoftlyInherited() && top != null) { + if (CssColorSLXHTML.isDisallowedColor(top)) { + throw new SLXHTMLInvalidParamException("color", top, getPropertyName(), ac); + } + } + } + + if (getLeft() != null) { + CssValue left = getLeft().getColor(); + if (!isSoftlyInherited() && left != null) { + if (CssColorSLXHTML.isDisallowedColor(left)) { + throw new SLXHTMLInvalidParamException("color", left, getPropertyName(), ac); + } + } + } + + if (getRight() != null) { + CssValue right = getRight().getColor(); + if (!isSoftlyInherited() && right != null) { + if (CssColorSLXHTML.isDisallowedColor(right)) { + throw new SLXHTMLInvalidParamException("color", right, getPropertyName(), ac); + } + } + } + + if (getBottom() != null) { + CssValue bottom = getBottom().getColor(); + if (!isSoftlyInherited() && bottom != null) { + if (CssColorSLXHTML.isDisallowedColor(bottom)) { + throw new SLXHTMLInvalidParamException("color", bottom, getPropertyName(), ac); + } + } + } + } + + public CssBorderSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderTopColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderTopColorSLXHTML.java new file mode 100644 index 00000000..42926479 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssBorderTopColorSLXHTML.java @@ -0,0 +1,57 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssBorderTopColorCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssBorderTopColorSLXHTML extends CssBorderTopColorCSS2 { + + public CssBorderTopColorSLXHTML() { + } + + public CssBorderTopColorSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + } + + public CssBorderTopColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssColorSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssColorSLXHTML.java new file mode 100644 index 00000000..a640eb3a --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssColorSLXHTML.java @@ -0,0 +1,99 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import java.util.HashSet; +import java.util.Set; + +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssColorSLXHTML extends org.w3c.css.properties.css1.CssColorCSS2 { + + private static Set<String> SLXHTML_DISSALLOWED_COLORS = new HashSet<String>(); + + static { + + SLXHTML_DISSALLOWED_COLORS.add("activeborder"); + SLXHTML_DISSALLOWED_COLORS.add("activecaption"); + SLXHTML_DISSALLOWED_COLORS.add("appworkspace"); + SLXHTML_DISSALLOWED_COLORS.add("background"); + SLXHTML_DISSALLOWED_COLORS.add("buttonface"); + SLXHTML_DISSALLOWED_COLORS.add("buttonhighlight"); + SLXHTML_DISSALLOWED_COLORS.add("buttonshadow"); + SLXHTML_DISSALLOWED_COLORS.add("buttontext"); + SLXHTML_DISSALLOWED_COLORS.add("captiontext"); + SLXHTML_DISSALLOWED_COLORS.add("graytext"); + SLXHTML_DISSALLOWED_COLORS.add("highlight"); + SLXHTML_DISSALLOWED_COLORS.add("highlighttext"); + SLXHTML_DISSALLOWED_COLORS.add("inactiveborder"); + SLXHTML_DISSALLOWED_COLORS.add("inactivecaption"); + SLXHTML_DISSALLOWED_COLORS.add("inactivecaptiontext"); + SLXHTML_DISSALLOWED_COLORS.add("infobackground"); + SLXHTML_DISSALLOWED_COLORS.add("infotext"); + SLXHTML_DISSALLOWED_COLORS.add("menu"); + SLXHTML_DISSALLOWED_COLORS.add("menutext"); + SLXHTML_DISSALLOWED_COLORS.add("scrollbar"); + SLXHTML_DISSALLOWED_COLORS.add("threeddarkshadow"); + SLXHTML_DISSALLOWED_COLORS.add("threedface"); + SLXHTML_DISSALLOWED_COLORS.add("threedhighlight"); + SLXHTML_DISSALLOWED_COLORS.add("threedlightshadow"); + SLXHTML_DISSALLOWED_COLORS.add("threedshadow"); + SLXHTML_DISSALLOWED_COLORS.add("window"); + SLXHTML_DISSALLOWED_COLORS.add("windowframe"); + SLXHTML_DISSALLOWED_COLORS.add("windowtext"); + + } + + public static boolean isDisallowedColor(CssValue cssValue) { + return SLXHTML_DISSALLOWED_COLORS.contains(cssValue.toString().toLowerCase()); + } + + public CssColorSLXHTML() { + } + + public CssColorSLXHTML(ApplContext ac, CssExpression expression, boolean check) + throws InvalidParamException { + + super(ac, expression, check); + + // A Citizen Card Environment must support all the options for specifying a + // colour listed in [CSS 2], section 4.3.6 for a CSS property, if such an + // option is available for this property according to [CSS 2]. + + // The exceptions are the system colours (cf. [CSS 2], section 18.2); these + // must not be used in an instance document so as to prevent dependencies on + // the system environment. Otherwise the instance document must be rejected + // by the Citizen Card Environment. + + CssValue color = getColor(); + if (!isSoftlyInherited() && color != null) { + if (CssColorSLXHTML.isDisallowedColor(color)) { + throw new SLXHTMLInvalidParamException("color", color, getPropertyName(), ac); + } + } + + } + + public CssColorSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssFontSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssFontSLXHTML.java new file mode 100644 index 00000000..8e5298ec --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssFontSLXHTML.java @@ -0,0 +1,59 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssFontCSS2; +import org.w3c.css.properties.css1.CssFontConstantCSS2; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssIdent; +import org.w3c.css.values.CssValue; + +public class CssFontSLXHTML extends CssFontCSS2 { + + public CssFontSLXHTML() { + } + + public CssFontSLXHTML(ApplContext ac, CssExpression expression, boolean check) + throws InvalidParamException { + super(ac, checkExpression(expression, ac), check); + } + + public CssFontSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + + protected static CssExpression checkExpression(CssExpression expression, + ApplContext ac) throws InvalidParamException { + + CssValue value = expression.getValue(); + + if (value instanceof CssIdent) { + for (String font : CssFontConstantCSS2.FONT) { + if (font.equalsIgnoreCase(value.toString())) { + throw new SLXHTMLInvalidParamException("font", value.toString(), ac); + } + } + } + + return expression; + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssLetterSpacingSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssLetterSpacingSLXHTML.java new file mode 100644 index 00000000..326a731f --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssLetterSpacingSLXHTML.java @@ -0,0 +1,54 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssLetterSpacing; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssLength; +import org.w3c.css.values.CssNumber; + +public class CssLetterSpacingSLXHTML extends CssLetterSpacing { + + public CssLetterSpacingSLXHTML() { + } + + public CssLetterSpacingSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + Object value = get(); + if (value instanceof CssLength) { + Object length = ((CssLength) value).get(); + if (length instanceof Float && ((Float) length).floatValue() < 0) { + throw new SLXHTMLInvalidParamException("spacing", length, getPropertyName(), ac); + } + } else if (value instanceof CssNumber) { + if (((CssNumber) value).getValue() < 0) { + throw new SLXHTMLInvalidParamException("spacing", value, getPropertyName(), ac); + } + } + + } + + public CssLetterSpacingSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginBottomSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginBottomSLXHTML.java new file mode 100644 index 00000000..cac97d06 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginBottomSLXHTML.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssMarginBottom; +import org.w3c.css.properties.css1.CssMarginSide; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssMarginBottomSLXHTML extends CssMarginBottom { + + public CssMarginBottomSLXHTML() { + } + + public CssMarginBottomSLXHTML(CssMarginSide another) { + super(another); + } + + public CssMarginBottomSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + + public CssMarginBottomSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The margin-top, margin-bottom, margin-left and margin-right properties + // must be supported by a Citizen Card Environment. Values specified as + // percentages (cf. section 3.5.1.2) should be supported. + + // The margin property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssMarginSLXHTML.isDisallowedMargin(getValue())) { + throw new SLXHTMLInvalidParamException("margin", getValue(), + getPropertyName(), ac); + } + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginLeftSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginLeftSLXHTML.java new file mode 100644 index 00000000..c456af43 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginLeftSLXHTML.java @@ -0,0 +1,61 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssMarginLeft; +import org.w3c.css.properties.css1.CssMarginSide; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssMarginLeftSLXHTML extends CssMarginLeft { + + public CssMarginLeftSLXHTML() { + } + + public CssMarginLeftSLXHTML(CssMarginSide another) { + super(another); + } + + public CssMarginLeftSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + + public CssMarginLeftSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // TODO Auto-generated constructor stub + // The margin-top, margin-bottom, margin-left and margin-right properties + // must be supported by a Citizen Card Environment. Values specified as + // percentages (cf. section 3.5.1.2) should be supported. + + // The margin property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssMarginSLXHTML.isDisallowedMargin(getValue())) { + throw new SLXHTMLInvalidParamException("margin", getValue(), + getPropertyName(), ac); + } + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginRightSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginRightSLXHTML.java new file mode 100644 index 00000000..7f16830d --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginRightSLXHTML.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssMarginRight; +import org.w3c.css.properties.css1.CssMarginSide; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssMarginRightSLXHTML extends CssMarginRight { + + public CssMarginRightSLXHTML() { + } + + public CssMarginRightSLXHTML(CssMarginSide another) { + super(another); + } + + public CssMarginRightSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + + public CssMarginRightSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The margin-top, margin-bottom, margin-left and margin-right properties + // must be supported by a Citizen Card Environment. Values specified as + // percentages (cf. section 3.5.1.2) should be supported. + + // The margin property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssMarginSLXHTML.isDisallowedMargin(getValue())) { + throw new SLXHTMLInvalidParamException("margin", getValue(), + getPropertyName(), ac); + } + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginSLXHTML.java new file mode 100644 index 00000000..f478b96a --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginSLXHTML.java @@ -0,0 +1,101 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssMargin; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssLength; +import org.w3c.css.values.CssNumber; +import org.w3c.css.values.CssPercentage; +import org.w3c.css.values.CssValue; + +public class CssMarginSLXHTML extends CssMargin { + + public CssMarginSLXHTML() { + } + + public CssMarginSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + if (getTop() != null) { + if (isDisallowedMargin(getTop().getValue())) { + throw new SLXHTMLInvalidParamException("margin", getTop().getValue(), + getPropertyName(), ac); + } + } + + if (getRight() != null) { + if (isDisallowedMargin(getRight().getValue())) { + throw new SLXHTMLInvalidParamException("margin", getRight().getValue(), + getPropertyName(), ac); + } + } + + if (getLeft() != null) { + if (isDisallowedMargin(getLeft().getValue())) { + throw new SLXHTMLInvalidParamException("margin", getLeft().getValue(), + getPropertyName(), ac); + } + } + + if (getBottom() != null) { + if (isDisallowedMargin(getBottom().getValue())) { + throw new SLXHTMLInvalidParamException("margin", getBottom().getValue(), + getPropertyName(), ac); + } + } + + } + + public CssMarginSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + + public static boolean isDisallowedMargin(CssValue margin) { + + // The margin-top, margin-bottom, margin-left and margin-right properties + // must be supported by a Citizen Card Environment. Values specified as + // percentages (cf. section 3.5.1.2) should be supported. + + // The margin property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (margin instanceof CssLength) { + Object value = ((CssLength) margin).get(); + if (value instanceof Float) { + return ((Float) value).floatValue() < 0; + } + } else if (margin instanceof CssPercentage) { + Object value = ((CssPercentage) margin).get(); + if (value instanceof Float) { + return ((Float) value).floatValue() < 0; + } + } else if (margin instanceof CssNumber) { + return ((CssNumber) margin).getValue() < 0; + } + + return false; + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginTopSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginTopSLXHTML.java new file mode 100644 index 00000000..06b30c4f --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssMarginTopSLXHTML.java @@ -0,0 +1,61 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssMarginSide; +import org.w3c.css.properties.css1.CssMarginTop; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssMarginTopSLXHTML extends CssMarginTop { + + public CssMarginTopSLXHTML() { + } + + public CssMarginTopSLXHTML(CssMarginSide another) { + super(another); + } + + public CssMarginTopSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + + } + + public CssMarginTopSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The margin-top, margin-bottom, margin-left and margin-right properties + // must be supported by a Citizen Card Environment. Values specified as + // percentages (cf. section 3.5.1.2) should be supported. + + // The margin property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssMarginSLXHTML.isDisallowedMargin(getValue())) { + throw new SLXHTMLInvalidParamException("margin", getValue(), + getPropertyName(), ac); + } + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingBottomSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingBottomSLXHTML.java new file mode 100644 index 00000000..4bcb0065 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingBottomSLXHTML.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssPaddingBottom; +import org.w3c.css.properties.css1.CssPaddingSide; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssPaddingBottomSLXHTML extends CssPaddingBottom { + + public CssPaddingBottomSLXHTML() { + } + + public CssPaddingBottomSLXHTML(CssPaddingSide another) { + super(another); + } + + public CssPaddingBottomSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The padding-top, padding-bottom, padding-left and padding-right + // properties must be supported by a Citizen Card Environment. Values + // specified as percentages (cf. section 3.5.1.2) should be supported. + + // The padding property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssPaddingSLXHTML.isDisallowedValue(getValue())) { + throw new SLXHTMLInvalidParamException("padding", getValue(), + getPropertyName(), ac); + } + + } + + public CssPaddingBottomSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingLeftSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingLeftSLXHTML.java new file mode 100644 index 00000000..350a5c15 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingLeftSLXHTML.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssPaddingLeft; +import org.w3c.css.properties.css1.CssPaddingSide; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssPaddingLeftSLXHTML extends CssPaddingLeft { + + public CssPaddingLeftSLXHTML() { + } + + public CssPaddingLeftSLXHTML(CssPaddingSide another) { + super(another); + } + + public CssPaddingLeftSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The padding-top, padding-bottom, padding-left and padding-right + // properties must be supported by a Citizen Card Environment. Values + // specified as percentages (cf. section 3.5.1.2) should be supported. + + // The padding property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssPaddingSLXHTML.isDisallowedValue(getValue())) { + throw new SLXHTMLInvalidParamException("padding", getValue(), + getPropertyName(), ac); + } + + } + + public CssPaddingLeftSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingRightSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingRightSLXHTML.java new file mode 100644 index 00000000..d2d62748 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingRightSLXHTML.java @@ -0,0 +1,60 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssPaddingRight; +import org.w3c.css.properties.css1.CssPaddingSide; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssPaddingRightSLXHTML extends CssPaddingRight { + + public CssPaddingRightSLXHTML() { + } + + public CssPaddingRightSLXHTML(CssPaddingSide another) { + super(another); + } + + public CssPaddingRightSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The padding-top, padding-bottom, padding-left and padding-right + // properties must be supported by a Citizen Card Environment. Values + // specified as percentages (cf. section 3.5.1.2) should be supported. + + // The padding property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssPaddingSLXHTML.isDisallowedValue(getValue())) { + throw new SLXHTMLInvalidParamException("padding", getValue(), + getPropertyName(), ac); + } + + } + + public CssPaddingRightSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingSLXHTML.java new file mode 100644 index 00000000..57d7cf77 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingSLXHTML.java @@ -0,0 +1,102 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssPadding; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssLength; +import org.w3c.css.values.CssNumber; +import org.w3c.css.values.CssPercentage; +import org.w3c.css.values.CssValue; + +public class CssPaddingSLXHTML extends CssPadding { + + public CssPaddingSLXHTML() { + } + + public CssPaddingSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + if (getTop() != null) { + if (isDisallowedValue(getTop().getValue())) { + throw new SLXHTMLInvalidParamException("padding", getTop().getValue(), + getPropertyName(), ac); + } + } + + if (getRight() != null) { + if (isDisallowedValue(getRight().getValue())) { + throw new SLXHTMLInvalidParamException("padding", getRight().getValue(), + getPropertyName(), ac); + } + } + + if (getLeft() != null) { + if (isDisallowedValue(getLeft().getValue())) { + throw new SLXHTMLInvalidParamException("padding", getLeft().getValue(), + getPropertyName(), ac); + } + } + + if (getBottom() != null) { + if (isDisallowedValue(getBottom().getValue())) { + throw new SLXHTMLInvalidParamException("padding", getBottom().getValue(), + getPropertyName(), ac); + } + } + + } + + public CssPaddingSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + + public static boolean isDisallowedValue(CssValue padding) { + + // The padding-top, padding-bottom, padding-left and padding-right + // properties must be supported by a Citizen Card Environment. Values + // specified as percentages (cf. section 3.5.1.2) should be supported. + + // The padding property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (padding instanceof CssLength) { + Object value = ((CssLength) padding).get(); + if (value instanceof Float) { + return ((Float) value).floatValue() < 0; + } + } else if (padding instanceof CssPercentage) { + Object value = ((CssPercentage) padding).get(); + if (value instanceof Float) { + return ((Float) value).floatValue() < 0; + } + } else if (padding instanceof CssNumber) { + return ((CssNumber) padding).getValue() < 0; + } + + return false; + + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingTopSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingTopSLXHTML.java new file mode 100644 index 00000000..bc113bfe --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssPaddingTopSLXHTML.java @@ -0,0 +1,61 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssPaddingSide; +import org.w3c.css.properties.css1.CssPaddingTop; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; + +public class CssPaddingTopSLXHTML extends CssPaddingTop { + + public CssPaddingTopSLXHTML() { + } + + public CssPaddingTopSLXHTML(CssPaddingSide another) { + super(another); + } + + public CssPaddingTopSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + // The padding-top, padding-bottom, padding-left and padding-right + // properties must be supported by a Citizen Card Environment. Values + // specified as percentages (cf. section 3.5.1.2) should be supported. + + // The padding property may be supported by a Citizen Card Environment. + + // An instance document must not contain a negative value in the properties + // mentioned above. Otherwise it must be rejected by the Citizen Card + // Environment. + + if (CssPaddingSLXHTML.isDisallowedValue(getValue())) { + throw new SLXHTMLInvalidParamException("padding", getValue(), + getPropertyName(), ac); + } + + } + + public CssPaddingTopSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + super(ac, expression); + // TODO Auto-generated constructor stub + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssTextDecorationSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssTextDecorationSLXHTML.java new file mode 100644 index 00000000..16b9780a --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssTextDecorationSLXHTML.java @@ -0,0 +1,51 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssTextDecoration; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssValue; + +public class CssTextDecorationSLXHTML extends CssTextDecoration { + + public CssTextDecorationSLXHTML() { + } + + public CssTextDecorationSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + if (get() instanceof CssValue) { + if ("blink".equalsIgnoreCase(((CssValue) get()).toString())) { + throw new SLXHTMLInvalidParamException("text-decoration", "blink", ac); + } + } else if (get() instanceof String) { + if ("blink".equalsIgnoreCase((String) get())) { + throw new SLXHTMLInvalidParamException("text-decoration", "blink", ac); + } + } + + } + + public CssTextDecorationSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssWordSpacingSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssWordSpacingSLXHTML.java new file mode 100644 index 00000000..a497f4e3 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/CssWordSpacingSLXHTML.java @@ -0,0 +1,54 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css1.CssWordSpacing; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssLength; +import org.w3c.css.values.CssNumber; + +public class CssWordSpacingSLXHTML extends CssWordSpacing { + + public CssWordSpacingSLXHTML() { + } + + public CssWordSpacingSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + Object value = get(); + if (value instanceof CssLength) { + Object length = ((CssLength) value).get(); + if (length instanceof Float && ((Float) length).floatValue() < 0) { + throw new SLXHTMLInvalidParamException("spacing", length, getPropertyName(), ac); + } + } else if (value instanceof CssNumber) { + if (((CssNumber) value).getValue() < 0) { + throw new SLXHTMLInvalidParamException("spacing", value, getPropertyName(), ac); + } + } + + } + + public CssWordSpacingSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/SLXHTMLInvalidParamException.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/SLXHTMLInvalidParamException.java new file mode 100644 index 00000000..edac03f4 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/SLXHTMLInvalidParamException.java @@ -0,0 +1,71 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import java.text.MessageFormat; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +import org.w3c.css.util.ApplContext; + +public class SLXHTMLInvalidParamException extends + org.w3c.css.util.InvalidParamException { + + private static final long serialVersionUID = 1L; + + protected String message; + + public SLXHTMLInvalidParamException() { + } + + public SLXHTMLInvalidParamException(String error, ApplContext ac) { + setMessage(error, null, ac); + } + + public SLXHTMLInvalidParamException(String error, Object message, ApplContext ac) { + setMessage(error, new Object[] {message}, ac); + } + + public SLXHTMLInvalidParamException(String error, Object message1, Object message2, + ApplContext ac) { + setMessage(error, new Object[] {message1, message2}, ac); + } + + @Override + public String getMessage() { + return getLocalizedMessage(); + } + + @Override + public String getLocalizedMessage() { + return message; + } + + protected void setMessage(String error, Object[] arguments, ApplContext ac) { + Locale locale = new Locale(ac.getContentLanguage()); + ResourceBundle bundle = ResourceBundle.getBundle("at/gv/egiz/bku/slxhtml/css/Messages", locale); + String pattern; + try { + pattern = bundle.getString(error); + } catch (MissingResourceException e) { + pattern = "Can't find error message for : " + error; + } + message = MessageFormat.format(pattern, arguments); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/SLXHTMLStyle.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/SLXHTMLStyle.java new file mode 100644 index 00000000..99448ec4 --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/SLXHTMLStyle.java @@ -0,0 +1,22 @@ +// +// $Id: Css2Style.java,v 1.2 2005-09-08 12:24:01 ylafon Exp $ +// From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr) +// +// (c) COPYRIGHT MIT and INRIA, 1997. +// Please first read the full copyright statement in file COPYRIGHT.html +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.aural.ACssStyle; +import org.w3c.css.parser.CssPrinterStyle; + +/** + * @version $Revision: 1.2 $ + */ +public class SLXHTMLStyle extends ACssStyle { + + public void print(CssPrinterStyle printer) { + super.print(printer); + } + + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/TableLayoutSLXHTML.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/TableLayoutSLXHTML.java new file mode 100644 index 00000000..50f30cce --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/css/TableLayoutSLXHTML.java @@ -0,0 +1,45 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import org.w3c.css.properties.css2.table.TableLayout; +import org.w3c.css.util.ApplContext; +import org.w3c.css.util.InvalidParamException; +import org.w3c.css.values.CssExpression; +import org.w3c.css.values.CssIdent; + +public class TableLayoutSLXHTML extends TableLayout { + + public TableLayoutSLXHTML() { + } + + public TableLayoutSLXHTML(ApplContext ac, CssExpression expression, + boolean check) throws InvalidParamException { + super(ac, expression, check); + + if (new CssIdent("fixed").equals(get())) { + throw new SLXHTMLInvalidParamException("table-layout", "fixed", getPropertyName(), ac); + } + + } + + public TableLayoutSLXHTML(ApplContext ac, CssExpression expression) + throws InvalidParamException { + this(ac, expression, false); + } + +} diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java new file mode 100644 index 00000000..dee8ff2e --- /dev/null +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java @@ -0,0 +1,91 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.text; + +import at.gv.egiz.bku.gui.viewer.FontProviderException; +import at.gv.egiz.bku.viewer.ResourceFontLoader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.nio.CharBuffer; +import java.nio.charset.Charset; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import at.gv.egiz.bku.viewer.ValidationException; +import at.gv.egiz.bku.viewer.Validator; +import java.awt.Font; + +public class TextValidator implements Validator { + + /** + * Logging facility. + */ + protected static Log log = LogFactory.getLog(TextValidator.class); + + protected Font viewerFont; + + public TextValidator() throws FontProviderException { + viewerFont = new ResourceFontLoader().getFont(); + } + + private void invalid(char c) throws ValidationException { + log.info("Invalid character (0x" + Integer.toHexString(c) + ") found."); + // TODO: localize + throw new ValidationException(); + } + + @Override + public void validate(InputStream is, String charset) + throws ValidationException { + + InputStreamReader reader; + if (charset != null) { + try { + reader = new InputStreamReader(is, charset); + } catch (UnsupportedEncodingException e) { + log.info("Charset '" + charset + "' not supported.", e); + // TODO: localize + throw new ValidationException(e); + } + } else { + reader = new InputStreamReader(is, Charset.forName("UTF-8")); + } + + try { + char c; + CharBuffer cb = CharBuffer.allocate(256); + for (int l; (l = reader.read(cb)) != -1;) { + cb.flip(); + for (int i = 0; i < l; i++) { + c = cb.get(); + if (!viewerFont.canDisplay(c)) invalid(c); + } + } + cb.clear(); + } catch (IOException e) { + // TODO: localize + throw new ValidationException(e); + } + + + + } + +} diff --git a/BKUViewer/src/main/resources/META-INF/services/at.gv.egiz.bku.viewer.Validator b/BKUViewer/src/main/resources/META-INF/services/at.gv.egiz.bku.viewer.Validator new file mode 100644 index 00000000..0004949b --- /dev/null +++ b/BKUViewer/src/main/resources/META-INF/services/at.gv.egiz.bku.viewer.Validator @@ -0,0 +1,2 @@ +application/xhtml+xml at.gv.egiz.bku.slxhtml.SLXHTMLValidator +text/plain at.gv.egiz.bku.text.TextValidator
\ No newline at end of file diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml-model-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml-model-1.xsd new file mode 100644 index 00000000..14df3792 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml-model-1.xsd @@ -0,0 +1,473 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"> + <xs:import + namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd"/> + <xs:annotation> + <xs:documentation> + This is the XML Schema module of common content models for SLXHTML. + SLXHTML is a profile of XHTML (see W3C copyright notice below). + + @author: Gregor Karlinger gregor.karlinger@cio.gv.at + $Id: slxhtml-model-1.xsd,v 1.4 2004/05/12 11:35:31 karlinger Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + XHTML Document Model + This module describes the groupings of elements/attributes + that make up common content models for XHTML elements. + XHTML has following basic content models: + xhtml.Inline.mix; character-level elements + xhtml.Block.mix; block-like elements, e.g., paragraphs and lists + xhtml.Flow.mix; any block or inline elements + xhtml.HeadOpts.mix; Head Elements + xhtml.InlinePre.mix; Special class for pre content model + xhtml.InlineNoAnchor.mix; Content model for Anchor + + Any groups declared in this module may be used to create + element content models, but the above are considered 'global' + (insofar as that term applies here). XHTML has the + following Attribute Groups + xhtml.Core.extra.attrib + xhtml.I18n.extra.attrib + xhtml.Common.extra + + The above attribute Groups are considered Global + </xs:documentation> + </xs:annotation> + + <xs:attributeGroup name="xhtml.I18n.extra.attrib"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: attributeGroup "dir.attrib" removed. + </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.Common.extra"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: attributeGroup "style.attrib" removed. + </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.Core.extra.attrib"> + </xs:attributeGroup> + + <xs:attributeGroup + name="xhtml.Global.core.extra.attrib"> + <xs:annotation> + <xs:documentation> Extended Global Core Attributes </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + <xs:attributeGroup + name="xhtml.Global.I18n.extra.attrib"> + <xs:annotation> + <xs:documentation> Extended Global I18n attributes </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + <xs:attributeGroup + name="xhtml.Global.Common.extra"> + <xs:annotation> + <xs:documentation> Extended Global Common Attributes </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + + <xs:group name="xhtml.HeadOpts.mix"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "script", "meta", "link", "object" removed. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element + name="style" + type="xhtml.style.type"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.head.content"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: Only a single instance of element "style" is + allowed apart from the obligatory "title" element. + </xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:element + name="title" + type="xhtml.title.type"/> + <xs:group + ref="xhtml.HeadOpts.mix"/> + </xs:sequence> + </xs:group> + <!-- + ins and del are used to denote editing changes + --> + <xs:group name="xhtml.Edit.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "ins", "del" removed. + </xs:documentation> + </xs:annotation> + <xs:choice/> + </xs:group> + <!-- + script and noscript are used to contain scripts + and alternative content + --> + <xs:group name="xhtml.Script.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "script", "noscript" removed. + </xs:documentation> + </xs:annotation> + <xs:choice/> + </xs:group> + <xs:group name="xhtml.Misc.extra"> + <xs:sequence/> + </xs:group> + <!-- + These elements are neither block nor inline, and can + essentially be used anywhere in the document body. + --> + <xs:group + name="xhtml.Misc.class"> + <xs:choice> + <xs:group + ref="xhtml.Edit.class"/> + <xs:group + ref="xhtml.Script.class"/> + <xs:group + ref="xhtml.Misc.extra"/> + </xs:choice> + </xs:group> + <!-- Inline Elements --> + <xs:group + name="xhtml.InlStruct.class"> + <xs:choice> + <xs:element + name="br" + type="xhtml.br.type"/> + <xs:element + name="span" + type="xhtml.span.type"/> + </xs:choice> + </xs:group> + <xs:group + name="xhtml.InlPhras.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "dfn", "samp", "kbd", "var", "q" , "abbr" and + "acronym" removed. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element + name="em" + type="xhtml.em.type"/> + <xs:element + name="strong" + type="xhtml.strong.type"/> + <xs:element + name="code" + type="xhtml.code.type"/> + <xs:element + name="cite" + type="xhtml.cite.type"/> + </xs:choice> + </xs:group> + <xs:group + name="xhtml.InlPres.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "tt", "i", "b", "big", "small", "sub", "sup" removed. + </xs:documentation> + </xs:annotation> + <xs:sequence/> + </xs:group> + <xs:group name="xhtml.I18n.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: element "bdo" removed. + </xs:documentation> + </xs:annotation> + <xs:sequence/> + </xs:group> + <xs:group name="xhtml.Anchor.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: element "a" removed. + </xs:documentation> + </xs:annotation> + <xs:sequence/> + </xs:group> + <xs:group + name="xhtml.InlSpecial.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "map", "object" removed. + </xs:documentation> + <xs:documentation> + MOCCA 1.0: element "img" removed + </xs:documentation> + </xs:annotation> + <!-- <xs:choice> + <xs:element + name="img" + type="xhtml.img.type"/> + </xs:choice>--> + <xs:sequence/> + </xs:group> + <xs:group name="xhtml.InlForm.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "input", "select", "textara", "lable", "button" removed. + </xs:documentation> + </xs:annotation> + <xs:sequence/> + </xs:group> + <xs:group + name="xhtml.Inline.extra"> + <xs:sequence/> + </xs:group> + <xs:group name="xhtml.Ruby.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: element "ruby" removed. + </xs:documentation> + </xs:annotation> + <xs:sequence/> + </xs:group> + + <xs:group + name="xhtml.Inline.class"> + <xs:choice> + <xs:group + ref="xhtml.InlStruct.class"/> + <xs:group + ref="xhtml.InlPhras.class"/> + <xs:group + ref="xhtml.InlPres.class"/> + <xs:group + ref="xhtml.I18n.class"/> + <xs:group + ref="xhtml.Anchor.class"/> + <xs:group + ref="xhtml.InlSpecial.class"/> + <xs:group + ref="xhtml.InlForm.class"/> + <xs:group + ref="xhtml.Ruby.class"/> + <xs:group + ref="xhtml.Inline.extra"/> + </xs:choice> + </xs:group> + <xs:group + name="xhtml.InlinePre.mix"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: elements "tt", "i", "b", "script", "map" removed. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:group + ref="xhtml.InlStruct.class"/> + <xs:group + ref="xhtml.InlPhras.class"/> + <xs:group + ref="xhtml.I18n.class"/> + <xs:group + ref="xhtml.Anchor.class"/> + <xs:group + ref="xhtml.Inline.extra"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.Inline.mix"> + <xs:choice> + <xs:group + ref="xhtml.Inline.class"/> + <xs:group + ref="xhtml.Misc.class"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.Heading.class"> + <xs:choice> + <xs:element + name="h1" + type="xhtml.h1.type"/> + <xs:element + name="h2" + type="xhtml.h2.type"/> + <xs:element + name="h3" + type="xhtml.h3.type"/> + <xs:element + name="h4" + type="xhtml.h4.type"/> + <xs:element + name="h5" + type="xhtml.h5.type"/> + <xs:element + name="h6" + type="xhtml.h6.type"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.List.class"> + <xs:choice> + <xs:element + name="ul" + type="xhtml.ul.type"/> + <xs:element + name="ol" + type="xhtml.ol.type"/> + <xs:element + name="dl" + type="xhtml.dl.type"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.Table.class"> + <xs:choice> + <xs:element + name="table" + type="xhtml.table.type"/> + </xs:choice> + </xs:group> + + <xs:group name="xhtml.Form.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: element "form" removed. + </xs:documentation> + </xs:annotation> + <xs:choice/> + </xs:group> + + <xs:group name="xhtml.Fieldset.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: element "fieldset" removed. + </xs:documentation> + </xs:annotation> + <xs:choice/> + </xs:group> + + <xs:group + name="xhtml.BlkStruct.class"> + <xs:choice> + <xs:element + name="p" + type="xhtml.p.type"/> + <xs:element + name="div" + type="xhtml.div.type"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.BlkPhras.class"> + <xs:annotation> + <xs:documentation> + SLXHTML 1.2: element "address" removed. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element + name="pre" + type="xhtml.pre.type"/> + <xs:element + name="blockquote" + type="xhtml.blockquote.type"/> + </xs:choice> + </xs:group> + <xs:group + name="xhtml.BlkPres.class"> + <xs:sequence> + <xs:element + name="hr" + type="xhtml.hr.type"/> + </xs:sequence> + </xs:group> + + <xs:group + name="xhtml.BlkSpecial.class"> + <xs:choice> + <xs:group + ref="xhtml.Table.class"/> + <xs:group + ref="xhtml.Form.class"/> + <xs:group + ref="xhtml.Fieldset.class"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.Block.extra"> + <xs:sequence/> + </xs:group> + + <xs:group + name="xhtml.Block.class"> + <xs:choice> + <xs:group + ref="xhtml.BlkStruct.class"/> + <xs:group + ref="xhtml.BlkPhras.class"/> + <xs:group + ref="xhtml.BlkPres.class"/> + <xs:group + ref="xhtml.BlkSpecial.class"/> + <xs:group + ref="xhtml.Block.extra"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.Block.mix"> + <xs:choice> + <xs:group + ref="xhtml.Heading.class"/> + <xs:group + ref="xhtml.List.class"/> + <xs:group + ref="xhtml.Block.class"/> + <xs:group + ref="xhtml.Misc.class"/> + </xs:choice> + </xs:group> + + <xs:group + name="xhtml.Flow.mix"> + <xs:choice> + <xs:group + ref="xhtml.Heading.class"/> + <xs:group + ref="xhtml.List.class"/> + <xs:group + ref="xhtml.Block.class"/> + <xs:group + ref="xhtml.Inline.class"/> + <xs:group + ref="xhtml.Misc.class"/> + </xs:choice> + </xs:group> + + <xs:element + name="html" + type="xhtml.html.type"/> +</xs:schema>
\ No newline at end of file diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml-modules-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml-modules-1.xsd new file mode 100644 index 00000000..b5d779a9 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml-modules-1.xsd @@ -0,0 +1,259 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"> + + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + This XML Schema declares changes to the content models + of modules included in SLXHTML 1.2 + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + Module Content Model Redefinitions + + This schema describes the changes (Redefinitions) to the + content model of individual modules as they are instantiated as part of + SLXHTML 1.2 Document + </xs:documentation> + </xs:annotation> + + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Changes to common attributes module --> + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + + <xs:include schemaLocation="xhtml-attribs-1.xsd"/> + + <!-- WORKAROUND to [#422] Get rid of Xerces 2.9.1 dependency (SLXHTML validation) + | + <xs:redefine schemaLocation="xhtml-attribs-1.xsd"> + + <xs:attributeGroup name="xhtml.I18n.attrib"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: Removed xml:lang attrib. + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.I18n.extra.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.title"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: Removed title attrib. + </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + + </xs:redefine> + |--> + + <xs:include schemaLocation="xhtml-framework-1.xsd"/> + + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Changes to block phrasal elements module --> + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + + <xs:include schemaLocation="xhtml-blkphras-1.xsd"/> + + <!-- WORKAROUND to [#422] Get rid of Xerces 2.9.1 dependency (SLXHTML validation) + | xercesImpl < 2.9.1 cannot handle redefinition here while schema is included elsewhere without redefinition + | + <xs:redefine schemaLocation="xhtml-blkphras-1.xsd"> + + <xs:attributeGroup name="xhtml.blockquote.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: Removed cite attrib. + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + </xs:redefine> + |--> + + <xs:include schemaLocation="xhtml-text-1.xsd"/> + + <xs:include schemaLocation="xhtml-list-1.xsd"/> + + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Changes to Structural Module --> + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + + <xs:redefine schemaLocation="xhtml-struct-1.xsd"> + + <xs:attributeGroup name="xhtml.version.attrib"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: Change value of the version attrib. + </xs:documentation> + </xs:annotation> + <xs:attribute name="version" type="xh11d:CDATA" fixed="-//www.buergerkarte.at//DOCUMENT SLXHTML 1.2//DE"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.profile.attrib"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: Removed profile attrib. + </xs:documentation> + </xs:annotation> + </xs:attributeGroup> + </xs:redefine> + + <xs:include schemaLocation="xhtml-pres-1.xsd"/> + + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Changes to images module --> + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + + <xs:redefine schemaLocation="xhtml-image-1.xsd"> + + <xs:attributeGroup name="xhtml.img.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: Removed attributes "longdesc", "height", "width". + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="src" type="xh11d:URI" use="required"/> + <xs:attribute name="alt" type="xh11d:Text" use="required"/> + </xs:attributeGroup> + + </xs:redefine> + + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Changes to style module --> + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + + <xs:redefine schemaLocation="xhtml-style-1.xsd"> + + <xs:attributeGroup name="xhtml.style.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute group "title" + Removed attribute "xml:space" + Fixed value of attribute "type" + Fixed value of attribute "media" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.I18n.attrib"/> + <xs:attribute name="type" type="xh11d:ContentType" use="required" fixed="text/css"/> + <xs:attribute name="media" type="xh11d:MediaDesc" fixed="screen"/> + </xs:attributeGroup> + + </xs:redefine> + + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Changes to table module --> + <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> + + <xs:redefine schemaLocation="xhtml-table-1.xsd"> + + <xs:attributeGroup name="xhtml.td.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "scope.attrib", "CellHAlign.attrib", "CellVAlign.attrib" + Removed attributes "abbr", "axis", "headers" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="rowspan" type="xh11d:Number" default="1"/> + <xs:attribute name="colspan" type="xh11d:Number" default="1"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.th.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "scope.attrib", "CellHAlign.attrib", "CellVAlign.attrib" + Removed attributes "abbr", "axis", "headers" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="rowspan" type="xh11d:Number" default="1"/> + <xs:attribute name="colspan" type="xh11d:Number" default="1"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.tr.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "CellHAlign.attrib", "CellVAlign.attrib" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.col.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "CellHAlign.attrib", "CellVAlign.attrib" + Removed attributes "span", "width" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.colgroup.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "CellHAlign.attrib", "CellVAlign.attrib" + Removed attributes "span", "width" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.tbody.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "CellHAlign.attrib", "CellVAlign.attrib" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.tfoot.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "CellHAlign.attrib", "CellVAlign.attrib" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.thead.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "CellHAlign.attrib", "CellVAlign.attrib" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + + <xs:attributeGroup name="xhtml.table.attlist"> + <xs:annotation> + <xs:documentation> + Redefinition by SLXHTML 1.2: + Removed attribute groups "frame.attrib", "rules.attrib" + Removed attributes "summary", "width", "border", "cellspacing", "cellpadding" + </xs:documentation> + </xs:annotation> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + </xs:redefine> + +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml.xsd new file mode 100644 index 00000000..b6dceec5 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/slxhtml.xsd @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ | Important note:
+ | WORKAROUND to [#422] Get rid of Xerces 2.9.1 dependency (SLXHTML validation)
+ | requires changes to xhtml-attribs-1.xsd and xhtml-blkphras-1.xsd,
+ | when updating the xhtml schema make sure to re-incorporate the respective changes!
+ |
+-->
+<xs:schema targetNamespace="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" blockDefault="#all">
+ <xs:annotation>
+ <xs:documentation>
+ This is the XML Schema driver for SLXHTML 1.2.
+ SLXHTML is a profile of XHTML (see W3C copyright notice below).
+
+ @author: Gregor Karlinger gregor.karlinger@cio.gv.at
+ $Id: slxhtml.xsd,v 1.3 2004/05/12 11:35:31 karlinger Exp $
+ </xs:documentation>
+ </xs:annotation>
+ <xs:annotation>
+ <xs:documentation>
+ This is the Schema Driver file for SLXHTML 1.2
+ Document Type
+
+ This schema includes
+ + modules for SLXHTML 1.2 Document Type.
+
+ + schema that defines all the named model for
+ the SLXHTML 1.2 Document Type
+
+ + schema that redefines the content model of
+ individual elements defined in the Module
+ implementations.
+
+ SLXHTML 1.2 Document Type includes the following Modules
+
+ XHTML Core modules
+ + text
+ + lists
+ + structure
+
+ Other XHTML modules
+ + Style
+ + Image
+ + Tables
+
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="xml.xsd">
+ <xs:annotation>
+ <xs:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules
+ </xs:documentation>
+ </xs:annotation>
+ </xs:import>
+
+ <xs:include schemaLocation="slxhtml-model-1.xsd">
+ <xs:annotation>
+ <xs:documentation>
+ This schema redefines the content model defined by
+ the individual modules for SLXHTML 1.2 Document Type
+ </xs:documentation>
+ </xs:annotation>
+ </xs:include>
+
+ <xs:include schemaLocation="slxhtml-modules-1.xsd">
+ <xs:annotation>
+ <xs:documentation>
+ Document Model module for the SLXHTML 1.2 Document Type.
+ This schema file defines all named models used by XHTML
+ Modularization Framework for SLXHTML 1.2 Document Type
+ </xs:documentation>
+ </xs:annotation>
+ </xs:include>
+</xs:schema>
diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-attribs-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-attribs-1.xsd new file mode 100644 index 00000000..43fddc22 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-attribs-1.xsd @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + + <xs:annotation> + <xs:documentation> + This is the XML Schema common attributes module for XHTML + $Id: xhtml-attribs-1.xsd,v 1.7 2008/07/05 04:11:00 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_commonatts"/> + </xs:annotation> + <xs:import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="xml.xsd"> + <xs:annotation> + <xs:documentation> + This import brings in the XML namespace attributes + The module itself does not provide the schemaLocation + and expects the driver schema to provide the + actual SchemaLocation. + </xs:documentation> + </xs:annotation> + </xs:import> + <xs:attributeGroup name="xhtml.id"> + <xs:attribute name="id" type="xs:ID"/> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.class"> + <xs:attribute name="class" type="xs:NMTOKENS"/> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.title"> + <!-- WORKAROUND to [#422] Get rid of Xerces 2.9.1 dependency (SLXHTML validation) + | + <xs:attribute name="title" type="xs:string"/> --> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.Core.attrib"> + <xs:attribute ref="xml:space"/> + <xs:attributeGroup ref="xhtml.id"/> + <xs:attributeGroup ref="xhtml.class"/> + <xs:attributeGroup ref="xhtml.title"/> + <xs:attributeGroup ref="xhtml.Core.extra.attrib"/> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.I18n.attrib"> + <!-- WORKAROUND to [#422] Get rid of Xerces 2.9.1 dependency (SLXHTML validation) + | + <xs:attribute ref="xml:lang" /> --> + <xs:attributeGroup ref="xhtml.I18n.extra.attrib"/> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.Common.attrib"> + <xs:attributeGroup ref="xhtml.Core.attrib"/> + <xs:attributeGroup ref="xhtml.I18n.attrib"/> + <xs:attributeGroup ref="xhtml.Common.extra"/> + </xs:attributeGroup> + <!-- Global attributes --> + <xs:attribute name="id" type="xs:ID"/> + <xs:attribute name="class" type="xs:NMTOKENS"/> + <xs:attribute name="title" type="xs:string"/> + <xs:attributeGroup name="xhtml.Global.core.attrib"> + <xs:attribute ref="id"/> + <xs:attribute ref="class"/> + <xs:attribute ref="title"/> + <xs:attributeGroup ref="xhtml.Global.core.extra.attrib" /> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.Global.i18n.attrib"> + <xs:attribute ref="xml:lang" /> + <xs:attributeGroup ref="xhtml.Global.I18n.extra.attrib"/> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.Global.common.attrib"> + <xs:attributeGroup ref="xhtml.Global.core.attrib"/> + <xs:attributeGroup ref="xhtml.Global.i18n.attrib"/> + <xs:attributeGroup ref="xhtml.Global.Common.extra"/> + </xs:attributeGroup> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkphras-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkphras-1.xsd new file mode 100644 index 00000000..7e902568 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkphras-1.xsd @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" schemaLocation="xhtml-datatypes-1.xsd" /> + + <xs:include schemaLocation="xhtml-attribs-1.xsd" /> + + <xs:annotation> + <xs:documentation> + This is the XML Schema Block Phrasal support module for XHTML + $Id: xhtml-blkphras-1.xsd,v 1.7 2008/07/05 04:11:00 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Block Phrasal + This module declares the elements and their attributes used to + support block-level phrasal markup. + This is the XML Schema block phrasal elements module for XHTML + + * address, blockquote, pre, h1, h2, h3, h4, h5, h6 + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_textmodule"/> + </xs:annotation> + <xs:import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="xml.xsd"> + <xs:annotation> + <xs:documentation> + This import brings in the XML namespace attributes + The module itself does not provide the schemaLocation + and expects the driver schema to provide the + actual SchemaLocation. + </xs:documentation> + </xs:annotation> + </xs:import> + <!-- address --> + <xs:attributeGroup name="xhtml.address.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.address.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.address.type" mixed="true"> + <xs:group ref="xhtml.address.content"/> + <xs:attributeGroup ref="xhtml.address.attlist"/> + </xs:complexType> + <!-- blockquote --> + <xs:attributeGroup name="xhtml.blockquote.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <!-- WORKAROUND to [#422] Get rid of Xerces 2.9.1 dependency (SLXHTML validation) + <xs:attribute name="cite" type="xh11d:URI"/> --> + </xs:attributeGroup> + <xs:group name="xhtml.blockquote.content"> + <xs:sequence> + <xs:group ref="xhtml.Block.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.blockquote.type"> + <xs:group ref="xhtml.blockquote.content"/> + <xs:attributeGroup ref="xhtml.blockquote.attlist"/> + </xs:complexType> + <!-- pre --> + <xs:attributeGroup name="xhtml.pre.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.pre.content"> + <xs:sequence> + <xs:group ref="xhtml.InlinePre.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.pre.type" mixed="true"> + <xs:group ref="xhtml.pre.content"/> + <xs:attributeGroup ref="xhtml.pre.attlist"/> + </xs:complexType> + <!-- Heading Elements --> + <xs:attributeGroup name="xhtml.heading.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:complexType name="xhtml.heading.type" mixed="true"> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + <xs:attributeGroup ref="xhtml.heading.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.h1.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.h1.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.h1.type" mixed="true"> + <xs:group ref="xhtml.h1.content"/> + <xs:attributeGroup ref="xhtml.h1.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.h2.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.h2.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.h2.type" mixed="true"> + <xs:group ref="xhtml.h2.content"/> + <xs:attributeGroup ref="xhtml.h2.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.h3.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.h3.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.h3.type" mixed="true"> + <xs:group ref="xhtml.h3.content"/> + <xs:attributeGroup ref="xhtml.h3.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.h4.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.h4.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.h4.type" mixed="true"> + <xs:group ref="xhtml.h4.content"/> + <xs:attributeGroup ref="xhtml.h4.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.h5.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.h5.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.h5.type" mixed="true"> + <xs:group ref="xhtml.h5.content"/> + <xs:attributeGroup ref="xhtml.h5.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.h6.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.h6.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.h6.type" mixed="true"> + <xs:group ref="xhtml.h6.content"/> + <xs:attributeGroup ref="xhtml.h6.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkpres-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkpres-1.xsd new file mode 100644 index 00000000..cf42303a --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkpres-1.xsd @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + This is the XML SchemaBlock presentation element module for XHTML + $Id: xhtml-blkpres-1.xsd,v 1.2 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Block Presentational Elements + + * hr + + This module declares the elements and their attributes used to + support block-level presentational markup. + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_presentationmodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.hr.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.hr.content"> + <xs:sequence/> + </xs:group> + <xs:complexType name="xhtml.hr.type"> + <xs:group ref="xhtml.hr.content"/> + <xs:attributeGroup ref="xhtml.hr.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkstruct-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkstruct-1.xsd new file mode 100644 index 00000000..1e658580 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-blkstruct-1.xsd @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + Block Structural + + * div, p + + This module declares the elements and their attributes used to + support block-level structural markup. + + This is the XML Schema Block Structural module for XHTML + $Id: xhtml-blkstruct-1.xsd,v 1.3 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <!-- div --> + <xs:attributeGroup name="xhtml.div.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.div.content"> + <xs:sequence> + <xs:group ref="xhtml.Flow.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.div.type" mixed="true"> + <xs:group ref="xhtml.div.content"/> + <xs:attributeGroup ref="xhtml.div.attlist"/> + </xs:complexType> + <!-- p --> + <xs:attributeGroup name="xhtml.p.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.p.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.p.type" mixed="true"> + <xs:group ref="xhtml.p.content"/> + <xs:attributeGroup ref="xhtml.p.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-datatypes-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-datatypes-1.xsd new file mode 100644 index 00000000..860b1d6e --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-datatypes-1.xsd @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns="http://www.w3.org/1999/xhtml/datatypes/" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" + targetNamespace="http://www.w3.org/1999/xhtml/datatypes/" + elementFormDefault="qualified" +> + <xs:annotation> + <xs:documentation> + XHTML Datatypes + This is the XML Schema datatypes module for XHTML + + Defines containers for the XHTML datatypes, many of + these imported from other specifications and standards. + + $Id: xhtml-datatypes-1.xsd,v 1.11 2008/10/07 16:57:03 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstraction.html#s_common_attrtypes"/> + </xs:annotation> + + <!-- nn for pixels or nn% for percentage length --> + <xs:simpleType name="Length"> + <xs:union memberTypes="xs:nonNegativeInteger"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:pattern value="\d+[%]|\d*\.\d+[%]"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <!-- space-separated list of link types --> + <xs:simpleType name="LinkTypes"> + <xs:list itemType="xs:NMTOKEN"/> + </xs:simpleType> + <!-- single or comma-separated list of media descriptors --> + <xs:simpleType name="MediaDesc"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- pixel, percentage, or relative --> + <xs:simpleType name="MultiLength"> + <xs:union memberTypes="xh11d:Length"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:pattern value="\d*\*"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <!-- one or more digits (NUMBER) --> + <xs:simpleType name="Number"> + <xs:restriction base="xs:nonNegativeInteger"/> + </xs:simpleType> + <!-- integer representing length in pixels --> + <xs:simpleType name="Pixels"> + <xs:restriction base="xs:nonNegativeInteger"/> + </xs:simpleType> + <!-- script expression --> + <xs:simpleType name="Script"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- sixteen color names or RGB color expression--> + <xs:simpleType name="Color"> + <xs:union memberTypes="xs:NMTOKEN"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:pattern value="#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <!-- textual content --> + <xs:simpleType name="Text"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- Imported Datatypes --> + <!-- a single character, as per section 2.2 of [XML] --> + <xs:simpleType name="Character"> + <xs:restriction base="xs:string"> + <xs:length value="1" fixed="true"/> + </xs:restriction> + </xs:simpleType> + <!-- a character encoding, as per [RFC2045] --> + <xs:simpleType name="Charset"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- a space separated list of character encodings, as per [RFC2045] --> + <xs:simpleType name="Charsets"> + <xs:list itemType="Charset"/> + </xs:simpleType> + <!-- media type, as per [RFC2045] --> + <xs:simpleType name="ContentType"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- comma-separated list of media types, as per [RFC2045] --> + <xs:simpleType name="ContentTypes"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- date and time information. ISO date format --> + <xs:simpleType name="Datetime"> + <xs:restriction base="xs:dateTime"/> + </xs:simpleType> + <!-- formal public identifier, as per [ISO8879] --> + <xs:simpleType name="FPI"> + <xs:restriction base="xs:normalizedString"/> + </xs:simpleType> + + <!-- a window name as used in the target attribute --> + <xs:simpleType name="FrameTarget"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="_blank"/> + <xs:enumeration value="_self"/> + <xs:enumeration value="_parent"/> + <xs:enumeration value="_top"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z].*"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <!-- a language code, as per [RFC3066] --> + <xs:simpleType name="LanguageCode"> + <xs:restriction base="xs:language"/> + </xs:simpleType> + <!-- a comma separated list of language ranges --> + <xs:simpleType name="LanguageCodes"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- a Uniform Resource Identifier, see [URI] --> + <xs:simpleType name="URI"> + <xs:restriction base="xs:anyURI"/> + </xs:simpleType> + <!-- a space-separated list of Uniform Resource Identifiers, see [URI] --> + <xs:simpleType name="URIs"> + <xs:list itemType="xs:anyURI"/> + </xs:simpleType> + <!-- comma-separated list of MultiLength --> + <xs:simpleType name="MultiLengths"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- character Data --> + <xs:simpleType name="CDATA"> + <xs:restriction base="xs:string"/> + </xs:simpleType> + <!-- CURIE placeholder datatypes --> + <xs:simpleType name="CURIE"> + <xs:restriction base="xs:string"> + <xs:pattern value="(([\i-[:]][\c-[:]]*)?:)?.+" /> + <xs:minLength value="1"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="CURIEs"> + <xs:list itemType="xh11d:CURIE"/> + </xs:simpleType> + <xs:simpleType name="SafeCURIE"> + <xs:restriction base="xs:string"> + <xs:pattern value="\[(([\i-[:]][\c-[:]]*)?:)?.+\]" /> + <xs:minLength value="3"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="SafeCURIEs"> + <xs:list itemType="xh11d:SafeCURIE"/> + </xs:simpleType> + <xs:simpleType name="URIorSafeCURIE"> + <xs:union memberTypes="xs:anyURI xh11d:SafeCURIE" /> + </xs:simpleType> + <xs:simpleType name="URIorSafeCURIEs"> + <xs:list itemType="xh11d:URIorSafeCURIE"/> + </xs:simpleType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-framework-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-framework-1.xsd new file mode 100644 index 00000000..05b906d4 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-framework-1.xsd @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" + elementFormDefault="qualified" +> + <xs:annotation> + <xs:documentation> + This is the XML Schema Modular Framework support module for XHTML + $Id: xhtml-framework-1.xsd,v 1.5 2005/09/26 23:37:47 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + XHTML Modular Framework + This required module instantiates the necessary modules + needed to support the XHTML modularization framework. + + The Schema modules instantiated are: + + notations + + datatypes + + common attributes + + character entities + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_commonatts"/> + </xs:annotation> + <!-- xs:include schemaLocation="xhtml-notations-1.xsd"> + <xs:annotation> + <xs:documentation> + Notations module + Declares XHTML notations for Attribute data types + </xs:documentation> + </xs:annotation> + </xs:include --> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" schemaLocation="xhtml-datatypes-1.xsd"> + <xs:annotation> + <xs:documentation> + This module defines XHTML Attribute DataTypes + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstraction.html#s_common_attrtypes"/> + </xs:annotation> + </xs:import> + <xs:include schemaLocation="xhtml-attribs-1.xsd"> + <xs:annotation> + <xs:documentation> + This module defines Common attributes for XHTML + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_commonatts"/> + </xs:annotation> + </xs:include> + <!-- xs:include schemaLocation="xhtml-charent-1.xsd"> + <xs:annotation> + <xs:documentation> + Character entities module + Note: Entities are not supported in XML Schema + The Schema Module uses DTDs to define Entities + + This module defines + + XHTML Latin 1 Character Entities + + XHTML Special Characters + + XHTML Mathematical, Greek, and Symbolic Characters + </xs:documentation> + </xs:annotation> + </xs:include --> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-image-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-image-1.xsd new file mode 100644 index 00000000..cd16bc9b --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-image-1.xsd @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + + <xs:annotation> + <xs:documentation> + Images + This is the XML Schema Images module for XHTML + + * img + + This module provides markup to support basic image embedding. + + To avoid problems with text-only UAs as well as to make + image content understandable and navigable to users of + non-visual UAs, you need to provide a description with + the 'alt' attribute, and avoid server-side image maps. + + + $Id: xhtml-image-1.xsd,v 1.2 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_imagemodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.img.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="src" type="xh11d:URI" use="required"/> + <xs:attribute name="alt" type="xh11d:Text" use="required"/> + <xs:attribute name="longdesc" type="xh11d:URI"/> + <xs:attribute name="height" type="xh11d:Length"/> + <xs:attribute name="width" type="xh11d:Length"/> + </xs:attributeGroup> + <xs:group name="xhtml.img.content"> + <xs:sequence/> + </xs:group> + <xs:complexType name="xhtml.img.type"> + <xs:group ref="xhtml.img.content"/> + <xs:attributeGroup ref="xhtml.img.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlphras-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlphras-1.xsd new file mode 100644 index 00000000..919c59de --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlphras-1.xsd @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + + <xs:annotation> + <xs:documentation> + This is the XML Schema Inline Phrasal support module for XHTML + $Id: xhtml-inlphras-1.xsd,v 1.4 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Inline Phrasal. + This module declares the elements and their attributes used to + support inline-level phrasal markup. + This is the XML Schema Inline Phrasal module for XHTML + + * abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var + + $Id: xhtml-inlphras-1.xsd,v 1.4 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_textmodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.abbr.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.abbr.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.abbr.type" mixed="true"> + <xs:group ref="xhtml.abbr.content"/> + <xs:attributeGroup ref="xhtml.abbr.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.acronym.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.acronym.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.acronym.type" mixed="true"> + <xs:group ref="xhtml.acronym.content"/> + <xs:attributeGroup ref="xhtml.acronym.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.cite.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.cite.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.cite.type" mixed="true"> + <xs:group ref="xhtml.cite.content"/> + <xs:attributeGroup ref="xhtml.cite.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.code.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.code.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.code.type" mixed="true"> + <xs:group ref="xhtml.code.content"/> + <xs:attributeGroup ref="xhtml.code.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.dfn.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.dfn.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.dfn.type" mixed="true"> + <xs:group ref="xhtml.dfn.content"/> + <xs:attributeGroup ref="xhtml.dfn.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.em.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.em.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.em.type" mixed="true"> + <xs:group ref="xhtml.em.content"/> + <xs:attributeGroup ref="xhtml.em.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.kbd.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.kbd.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.kbd.type" mixed="true"> + <xs:group ref="xhtml.kbd.content"/> + <xs:attributeGroup ref="xhtml.kbd.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.samp.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.samp.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.samp.type" mixed="true"> + <xs:group ref="xhtml.samp.content"/> + <xs:attributeGroup ref="xhtml.samp.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.strong.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.strong.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.strong.type" mixed="true"> + <xs:group ref="xhtml.strong.content"/> + <xs:attributeGroup ref="xhtml.strong.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.var.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.var.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.var.type" mixed="true"> + <xs:group ref="xhtml.var.content"/> + <xs:attributeGroup ref="xhtml.var.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.q.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="cite" type="xh11d:URI"/> + </xs:attributeGroup> + <xs:group name="xhtml.q.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.q.type" mixed="true"> + <xs:group ref="xhtml.q.content"/> + <xs:attributeGroup ref="xhtml.q.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlpres-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlpres-1.xsd new file mode 100644 index 00000000..a053447c --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlpres-1.xsd @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + This is the XML Schema Inline Presentation element module for XHTML + $Id: xhtml-inlpres-1.xsd,v 1.2 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Inline Presentational Elements + + * b, big, i, small, sub, sup, tt + + This module declares the elements and their attributes used to + support inline-level presentational markup. + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_presentationmodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.InlPres.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.InlPres.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.InlPres.type" mixed="true"> + <xs:group ref="xhtml.InlPres.content"/> + <xs:attributeGroup ref="xhtml.InlPres.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlstruct-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlstruct-1.xsd new file mode 100644 index 00000000..635eb5f1 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-inlstruct-1.xsd @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + This is the XML Schema Inline Structural support module for XHTML + $Id: xhtml-inlstruct-1.xsd,v 1.4 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Inline Structural. + This module declares the elements and their attributes + used to support inline-level structural markup. + This is the XML Schema Inline Structural element module for XHTML + + * br, span + + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_textmodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.br.attlist"> + <xs:attributeGroup ref="xhtml.Core.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.br.content"> + <xs:sequence/> + </xs:group> + <xs:complexType name="xhtml.br.type"> + <xs:group ref="xhtml.br.content"/> + <xs:attributeGroup ref="xhtml.br.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.span.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.span.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.span.type" mixed="true"> + <xs:group ref="xhtml.span.content"/> + <xs:attributeGroup ref="xhtml.span.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-list-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-list-1.xsd new file mode 100644 index 00000000..cc22ba88 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-list-1.xsd @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + List Module + This is the XML Schema Lists module for XHTML + List Module Elements + + * dl, dt, dd, ol, ul, li + + This module declares the list-oriented element types + and their attributes. + $Id: xhtml-list-1.xsd,v 1.2 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_listmodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.dt.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.dt.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.dt.type" mixed="true"> + <xs:group ref="xhtml.dt.content"/> + <xs:attributeGroup ref="xhtml.dt.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.dd.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.dd.content"> + <xs:sequence> + <xs:group ref="xhtml.Flow.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.dd.type" mixed="true"> + <xs:group ref="xhtml.dd.content"/> + <xs:attributeGroup ref="xhtml.dd.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.dl.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.dl.content"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="dt" type="xhtml.dt.type"/> + <xs:element name="dd" type="xhtml.dd.type"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.dl.type"> + <xs:group ref="xhtml.dl.content"/> + <xs:attributeGroup ref="xhtml.dl.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.li.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.li.content"> + <xs:sequence> + <xs:group ref="xhtml.Flow.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.li.type" mixed="true"> + <xs:group ref="xhtml.li.content"/> + <xs:attributeGroup ref="xhtml.li.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.ol.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.ol.content"> + <xs:sequence> + <xs:element name="li" type="xhtml.li.type" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.ol.type"> + <xs:group ref="xhtml.ol.content"/> + <xs:attributeGroup ref="xhtml.ol.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.ul.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.ul.content"> + <xs:sequence> + <xs:element name="li" type="xhtml.li.type" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.ul.type"> + <xs:group ref="xhtml.ul.content"/> + <xs:attributeGroup ref="xhtml.ul.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-pres-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-pres-1.xsd new file mode 100644 index 00000000..bc36fc48 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-pres-1.xsd @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + This is the XML Schema Presentation module for XHTML + This is a REQUIRED module. + $Id: xhtml-pres-1.xsd,v 1.2 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Presentational Elements + + This module defines elements and their attributes for + simple presentation-related markup. + + Elements defined here: + + * hr + * b, big, i, small, sub, sup, tt + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_presentationmodule"/> + </xs:annotation> + <xs:include schemaLocation="xhtml-blkpres-1.xsd"> + <xs:annotation> + <xs:documentation> + Block Presentational module + Elements defined here: + + * hr + </xs:documentation> + </xs:annotation> + </xs:include> + <xs:include schemaLocation="xhtml-inlpres-1.xsd"> + <xs:annotation> + <xs:documentation> + Inline Presentational module + Elements defined here: + + * b, big, i, small, sub, sup, tt + </xs:documentation> + </xs:annotation> + </xs:include> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-struct-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-struct-1.xsd new file mode 100644 index 00000000..39c8055d --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-struct-1.xsd @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"> + <xs:import + namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd"/> + <xs:annotation> + <xs:documentation> + This is the XML Schema Document Structure module for XHTML + Document Structure + + * title, head, body, html + + The Structure Module defines the major structural elements and + their attributes. + + $Id: xhtml-struct-1.xsd,v 1.10 2008/07/05 04:11:00 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_structuremodule"/> + </xs:annotation> + <xs:import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="xml.xsd"> + <xs:annotation> + <xs:documentation> + This import brings in the XML namespace attributes + The module itself does not provide the schemaLocation + and expects the driver schema to provide the + actual SchemaLocation. + </xs:documentation> + </xs:annotation> + </xs:import> + <xs:attributeGroup + name="xhtml.title.attlist"> + <xs:attributeGroup + ref="xhtml.I18n.attrib"/> + <xs:attributeGroup ref="xhtml.id"/> + <xs:attribute ref="xml:space"/> + </xs:attributeGroup> + <xs:group + name="xhtml.title.content"> + <xs:sequence/> + </xs:group> + <xs:complexType + name="xhtml.title.type" + mixed="true"> + <xs:group + ref="xhtml.title.content"/> + <xs:attributeGroup + ref="xhtml.title.attlist"/> + </xs:complexType> + <xs:attributeGroup + name="xhtml.profile.attrib"> + <xs:attribute + name="profile" + type="xh11d:URI"/> + </xs:attributeGroup> + <xs:attributeGroup + name="xhtml.head.attlist"> + <xs:attributeGroup + ref="xhtml.profile.attrib"/> + <xs:attributeGroup + ref="xhtml.I18n.attrib"/> + <xs:attributeGroup ref="xhtml.id"/> + <xs:attribute ref="xml:space"/> + </xs:attributeGroup> + <xs:complexType + name="xhtml.head.type"> + <xs:group + ref="xhtml.head.content"/> + <xs:attributeGroup + ref="xhtml.head.attlist"/> + </xs:complexType> + <xs:attributeGroup + name="xhtml.body.attlist"> + <xs:attributeGroup + ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group + name="xhtml.body.content"> + <xs:sequence> + <xs:group + ref="xhtml.Block.mix" + minOccurs="0" + maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType + name="xhtml.body.type"> + <xs:group + ref="xhtml.body.content"/> + <xs:attributeGroup + ref="xhtml.body.attlist"/> + </xs:complexType> + <xs:attributeGroup + name="xhtml.version.attrib"> + <xs:attribute + name="version" + type="xh11d:CDATA"/> + </xs:attributeGroup> + <xs:attributeGroup + name="xhtml.html.attlist"> + <xs:attributeGroup + ref="xhtml.version.attrib"/> + <xs:attributeGroup + ref="xhtml.I18n.attrib"/> + <xs:attributeGroup ref="xhtml.id"/> + <xs:attribute ref="xml:space"/> + </xs:attributeGroup> + <xs:group + name="xhtml.html.content"> + <xs:sequence> + <xs:element + name="head" + type="xhtml.head.type"/> + <xs:element + name="body" + type="xhtml.body.type"/> + </xs:sequence> + </xs:group> + <xs:complexType + name="xhtml.html.type"> + <xs:group + ref="xhtml.html.content"/> + <xs:attributeGroup + ref="xhtml.html.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-style-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-style-1.xsd new file mode 100644 index 00000000..1b3e7d3b --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-style-1.xsd @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + + <xs:annotation> + <xs:documentation> + This is the XML Schema Stylesheets module for XHTML + $Id: xhtml-style-1.xsd,v 1.5 2006/09/11 10:14:57 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Stylesheets + + * style + + This module declares the style element type and its attributes, + used to embed stylesheet information in the document head element. + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_stylemodule"/> + </xs:annotation> + <xs:import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="xml.xsd"> + <xs:annotation> + <xs:documentation> + This import brings in the XML namespace attributes + The module itself does not provide the schemaLocation + and expects the driver schema to provide the + actual SchemaLocation. + </xs:documentation> + </xs:annotation> + </xs:import> + <xs:attributeGroup name="xhtml.style.attlist"> + <xs:attributeGroup ref="xhtml.id"/> + <xs:attributeGroup ref="xhtml.title"/> + <xs:attributeGroup ref="xhtml.I18n.attrib"/> + <xs:attribute name="type" type="xh11d:ContentType" use="required"/> + <xs:attribute name="media" type="xh11d:MediaDesc"/> + </xs:attributeGroup> + <xs:group name="xhtml.style.content"> + <xs:sequence/> + </xs:group> + <xs:complexType name="xhtml.style.type" mixed="true"> + <xs:group ref="xhtml.style.content"/> + <xs:attributeGroup ref="xhtml.style.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-table-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-table-1.xsd new file mode 100644 index 00000000..ec76db3c --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-table-1.xsd @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + + <xs:annotation> + <xs:documentation> + This is the XML Schema Tables module for XHTML + $Id: xhtml-table-1.xsd,v 1.3 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Tables + + * table, caption, thead, tfoot, tbody, colgroup, col, tr, th, td + + This module declares element types and attributes used to provide + table markup similar to HTML 4.0, including features that enable + better accessibility for non-visual user agents. + </xs:documentation> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_tablemodule"/> + </xs:annotation> + <xs:attributeGroup name="xhtml.frame.attrib"> + <xs:attribute name="frame"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="void"/> + <xs:enumeration value="above"/> + <xs:enumeration value="below"/> + <xs:enumeration value="hsides"/> + <xs:enumeration value="lhs"/> + <xs:enumeration value="rhs"/> + <xs:enumeration value="vsides"/> + <xs:enumeration value="box"/> + <xs:enumeration value="border"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.rules.attrib"> + <xs:attribute name="rules"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="none"/> + <xs:enumeration value="groups"/> + <xs:enumeration value="rows"/> + <xs:enumeration value="cols"/> + <xs:enumeration value="all"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.CellVAlign.attrib"> + <xs:attribute name="valign"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="top"/> + <xs:enumeration value="middle"/> + <xs:enumeration value="bottom"/> + <xs:enumeration value="baseline"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.CellHAlign.attrib"> + <xs:attribute name="align"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="left"/> + <xs:enumeration value="center"/> + <xs:enumeration value="right"/> + <xs:enumeration value="justify"/> + <xs:enumeration value="char"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="char" type="xh11d:Character"/> + <xs:attribute name="charoff" type="xh11d:Length"/> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.scope.attrib"> + <xs:attribute name="scope"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="row"/> + <xs:enumeration value="col"/> + <xs:enumeration value="rowgroup"/> + <xs:enumeration value="colgroup"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:attributeGroup> + <xs:attributeGroup name="xhtml.td.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="abbr" type="xh11d:Text"/> + <xs:attribute name="axis" type="xh11d:CDATA"/> + <xs:attribute name="headers" type="xs:IDREFS"/> + <xs:attributeGroup ref="xhtml.scope.attrib"/> + <xs:attribute name="rowspan" type="xh11d:Number" default="1"/> + <xs:attribute name="colspan" type="xh11d:Number" default="1"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.td.content"> + <xs:sequence> + <xs:group ref="xhtml.Flow.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.td.type" mixed="true"> + <xs:group ref="xhtml.td.content"/> + <xs:attributeGroup ref="xhtml.td.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.th.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="abbr" type="xh11d:Text"/> + <xs:attribute name="axis" type="xh11d:CDATA"/> + <xs:attribute name="headers" type="xs:IDREFS"/> + <xs:attributeGroup ref="xhtml.scope.attrib"/> + <xs:attribute name="rowspan" type="xh11d:Number" default="1"/> + <xs:attribute name="colspan" type="xh11d:Number" default="1"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.th.content"> + <xs:sequence> + <xs:group ref="xhtml.Flow.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.th.type" mixed="true"> + <xs:group ref="xhtml.th.content"/> + <xs:attributeGroup ref="xhtml.th.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.tr.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.tr.content"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="th" type="xhtml.th.type"/> + <xs:element name="td" type="xhtml.td.type"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.tr.type"> + <xs:group ref="xhtml.tr.content"/> + <xs:attributeGroup ref="xhtml.tr.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.col.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="span" type="xh11d:Number" default="1"/> + <xs:attribute name="width" type="xh11d:MultiLength"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.col.content"> + <xs:sequence/> + </xs:group> + <xs:complexType name="xhtml.col.type"> + <xs:group ref="xhtml.col.content"/> + <xs:attributeGroup ref="xhtml.col.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.colgroup.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="span" type="xh11d:Number" default="1"/> + <xs:attribute name="width" type="xh11d:MultiLength"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.colgroup.content"> + <xs:sequence> + <xs:element name="col" type="xhtml.col.type" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.colgroup.type"> + <xs:group ref="xhtml.colgroup.content"/> + <xs:attributeGroup ref="xhtml.colgroup.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.tbody.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.tbody.content"> + <xs:sequence> + <xs:element name="tr" type="xhtml.tr.type" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.tbody.type"> + <xs:group ref="xhtml.tbody.content"/> + <xs:attributeGroup ref="xhtml.tbody.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.tfoot.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.tfoot.content"> + <xs:sequence> + <xs:element name="tr" type="xhtml.tr.type" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.tfoot.type"> + <xs:group ref="xhtml.tfoot.content"/> + <xs:attributeGroup ref="xhtml.tfoot.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.thead.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attributeGroup ref="xhtml.CellHAlign.attrib"/> + <xs:attributeGroup ref="xhtml.CellVAlign.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.thead.content"> + <xs:sequence> + <xs:element name="tr" type="xhtml.tr.type" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.thead.type"> + <xs:group ref="xhtml.thead.content"/> + <xs:attributeGroup ref="xhtml.thead.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.caption.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + </xs:attributeGroup> + <xs:group name="xhtml.caption.content"> + <xs:sequence> + <xs:group ref="xhtml.Inline.mix" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.caption.type" mixed="true"> + <xs:group ref="xhtml.caption.content"/> + <xs:attributeGroup ref="xhtml.caption.attlist"/> + </xs:complexType> + <xs:attributeGroup name="xhtml.table.attlist"> + <xs:attributeGroup ref="xhtml.Common.attrib"/> + <xs:attribute name="summary" type="xh11d:Text"/> + <xs:attribute name="width" type="xh11d:Length"/> + <xs:attribute name="border" type="xh11d:Pixels"/> + <xs:attributeGroup ref="xhtml.frame.attrib"/> + <xs:attributeGroup ref="xhtml.rules.attrib"/> + <xs:attribute name="cellspacing" type="xh11d:Length"/> + <xs:attribute name="cellpadding" type="xh11d:Length"/> + </xs:attributeGroup> + <xs:group name="xhtml.table.content"> + <xs:sequence> + <xs:element name="caption" type="xhtml.caption.type" minOccurs="0"/> + <xs:choice> + <xs:element name="col" type="xhtml.col.type" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="colgroup" type="xhtml.colgroup.type" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + <xs:choice> + <xs:sequence> + <xs:element name="thead" type="xhtml.thead.type" minOccurs="0"/> + <xs:element name="tfoot" type="xhtml.tfoot.type" minOccurs="0"/> + <xs:element name="tbody" type="xhtml.tbody.type" maxOccurs="unbounded"/> + </xs:sequence> + <xs:choice> + <xs:element name="tr" type="xhtml.tr.type" maxOccurs="unbounded"/> + </xs:choice> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="xhtml.table.type"> + <xs:group ref="xhtml.table.content"/> + <xs:attributeGroup ref="xhtml.table.attlist"/> + </xs:complexType> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-text-1.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-text-1.xsd new file mode 100644 index 00000000..432bdad7 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xhtml-text-1.xsd @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" +> + <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" + schemaLocation="xhtml-datatypes-1.xsd" /> + <xs:annotation> + <xs:documentation> + Textual Content + This is the XML Schema Text module for XHTML + + The Text module includes declarations for all core + text container elements and their attributes. + + + block phrasal + + block structural + + inline phrasal + + inline structural + + $Id: xhtml-text-1.xsd,v 1.2 2005/09/26 22:54:53 ahby Exp $ + </xs:documentation> + <xs:documentation source="xhtml-copyright-1.xsd"/> + <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_textmodule"/> + </xs:annotation> + <xs:include schemaLocation="xhtml-blkphras-1.xsd"> + <xs:annotation> + <xs:documentation> + Block Phrasal module + Elements defined here: + + * address, blockquote, pre, h1, h2, h3, h4, h5, h6 + </xs:documentation> + </xs:annotation> + </xs:include> + <xs:include schemaLocation="xhtml-blkstruct-1.xsd"> + <xs:annotation> + <xs:documentation> + Block Structural module + Elements defined here: + + * div, p + </xs:documentation> + </xs:annotation> + </xs:include> + <xs:include schemaLocation="xhtml-inlphras-1.xsd"> + <xs:annotation> + <xs:documentation> + Inline Phrasal module + Elements defined here: + + * abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var + </xs:documentation> + </xs:annotation> + </xs:include> + <xs:include schemaLocation="xhtml-inlstruct-1.xsd"> + <xs:annotation> + <xs:documentation> + Inline Structural module + Elements defined here: + + * br,span + </xs:documentation> + </xs:annotation> + </xs:include> +</xs:schema> diff --git a/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xml.xsd b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xml.xsd new file mode 100644 index 00000000..eeb9db56 --- /dev/null +++ b/BKUViewer/src/main/resources/at/gv/egiz/bku/slxhtml/xml.xsd @@ -0,0 +1,145 @@ +<?xml version='1.0'?> +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"> + + <xs:annotation> + <xs:documentation> + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + id (as an attribute name): denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation>This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang, xml:space or xml:id + attributes on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes</xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation>In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2007/08/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself, or with the XML namespace itself. In other words, if the XML + Schema or XML namespaces change, the version of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2007/08/xml.xsd will not change. + </xs:documentation> + </xs:annotation> + + <xs:attribute name="lang"> + <xs:annotation> + <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. See + RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry + at http://www.iana.org/assignments/lang-tag-apps.htm for + further information. + + The union allows for the 'un-declaration' of xml:lang with + the empty string.</xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:union memberTypes="xs:language"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value=""/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="space"> + <xs:simpleType> + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> + <xs:annotation> + <xs:documentation>See http://www.w3.org/TR/xmlbase/ for + information about this attribute.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="id" type="xs:ID"> + <xs:annotation> + <xs:documentation>See http://www.w3.org/TR/xml-id/ for + information about this attribute.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + <xs:attribute ref="xml:id"/> + </xs:attributeGroup> + +</xs:schema> diff --git a/BKUViewer/src/main/resources/org/w3c/css/properties/Config.properties b/BKUViewer/src/main/resources/org/w3c/css/properties/Config.properties new file mode 100644 index 00000000..0ece8cda --- /dev/null +++ b/BKUViewer/src/main/resources/org/w3c/css/properties/Config.properties @@ -0,0 +1,32 @@ +# configuration file for org.w3c.css.parser.CssFouffa +# Properties should be in the style directory + +# Is the parser should run in CSS2 ? +extended-parser: true + +# the CssStyle to use +#style for CSS1 +css1: org.w3c.css.properties.css1.Css1Style +#style for CSS2 (and mobile profile and TV profile) +css2: org.w3c.css.properties.css2.font.Css2Style +#style for CSS2.1 +css21: org.w3c.css.properties.css21.Css21Style +#style for CSS3 +css3: org.w3c.css.properties.css3.Css3Style +#SVG styles +svg : org.w3c.css.properties.svg.SVGStyle +svgbasic : org.w3c.css.properties.svg.SVGBasicStyle +svgtiny : org.w3c.css.properties.svg.SVGTinyStyle +#ATSC style +atsc-tv: org.w3c.css.properties.atsc.ATSCStyle +#SLXHMTL +slxhtml: at.gv.egiz.bku.slxhtml.css.SLXHTMLStyle + +#media +media: Media.properties + +# file containing the properties files for each profile +profilesProperties: ProfilesProperties.properties + +#default profile +defaultProfile: css21 diff --git a/BKUViewer/src/main/resources/org/w3c/css/properties/ProfilesProperties.properties b/BKUViewer/src/main/resources/org/w3c/css/properties/ProfilesProperties.properties new file mode 100644 index 00000000..8c2aded8 --- /dev/null +++ b/BKUViewer/src/main/resources/org/w3c/css/properties/ProfilesProperties.properties @@ -0,0 +1,30 @@ +# The list of properties to use + +# properties for CSS1 +css1 : CSS1Properties.properties + +# properties for CSS2 +css2 : CSS2Properties.properties + +# properties for CSS2.1 +css21 : CSS21Properties.properties + +# properties for CSS3 +css3 : CSS3Properties.properties + +# properties for mobile profile +mobile : MobileProperties.properties + +# properties for ATSC TV profile +atsc-tv : ATSCProperties.properties + +# properties for TV profile +tv : TVProperties.properties + +# properties for SVG profiles +svg : SVGProperties.properties +svgbasic : SVGBasicProperties.properties +svgtiny : SVGTinyProperties.properties + +# properties for SLXHTML profile +slxhtml : SLXHTMLProperties.properties diff --git a/BKUViewer/src/main/resources/org/w3c/css/properties/SLXHTMLProperties.properties b/BKUViewer/src/main/resources/org/w3c/css/properties/SLXHTMLProperties.properties new file mode 100644 index 00000000..dec68c11 --- /dev/null +++ b/BKUViewer/src/main/resources/org/w3c/css/properties/SLXHTMLProperties.properties @@ -0,0 +1,641 @@ +# All properties for all media + +# CSS2 Properties + +# Margin spacing +# +# The margin-top, margin-bottom, margin-left and margin-right properties +# must be supported by a Citizen Card Environment. Values specified as percentages +# (cf. section 3.5.1.2) should be supported. +# +# The margin property may be supported by a Citizen Card Environment. +# +# An instance document must not contain a negative value in the properties mentioned +# above. Otherwise it must be rejected by the Citizen Card Environment. + +margin-top: at.gv.egiz.bku.slxhtml.css.CssMarginTopSLXHTML +margin-bottom: at.gv.egiz.bku.slxhtml.css.CssMarginBottomSLXHTML +margin-left: at.gv.egiz.bku.slxhtml.css.CssMarginLeftSLXHTML +margin-right: at.gv.egiz.bku.slxhtml.css.CssMarginRightSLXHTML +margin: at.gv.egiz.bku.slxhtml.css.CssMarginSLXHTML + +# Padding spacing +# +# The padding-top, padding-bottom, padding-left and padding-right properties must be +# supported by a Citizen Card Environment. Values specified as percentages (cf. section +# 3.5.1.2) should be supported. +# +# The padding property may be supported by a Citizen Card Environment. +# +# An instance document must not contain a negative value in the properties +# mentioned above. Otherwise it must be rejected by the Citizen Card Environment. + +padding-top: at.gv.egiz.bku.slxhtml.css.CssPaddingTopSLXHTML +padding-bottom: at.gv.egiz.bku.slxhtml.css.CssPaddingBottomSLXHTML +padding-left: at.gv.egiz.bku.slxhtml.css.CssPaddingLeftSLXHTML +padding-right: at.gv.egiz.bku.slxhtml.css.CssPaddingRightSLXHTML +padding: at.gv.egiz.bku.slxhtml.css.CssPaddingSLXHTML + +# +# Borders +# + +# Border width +# +# The border-top-width, border-bottom-width, border-left-width, border-right-width +# and border-width properties should be supported by a Citizen Card Environment. If +# the properties are supported, the predefined values thin, medium and thick should +# also be supported (cf. [CSS 2], section 8.5.1). + +border-top-width: org.w3c.css.properties.css1.CssBorderTopWidthCSS2 +border-right-width: org.w3c.css.properties.css1.CssBorderRightWidthCSS2 +border-left-width: org.w3c.css.properties.css1.CssBorderLeftWidthCSS2 +border-bottom-width: org.w3c.css.properties.css1.CssBorderBottomWidthCSS2 + +# Border colour +# +# The border-top-color, border-bottom-color, border-left-color, border-right-color +# and border-color properties should be supported by a Citizen Card Environment. The +# predefined value transparent for the border-color property may be supported (cf. +# [CSS 2], section 8.5.2). + +border-top-color: at.gv.egiz.bku.slxhtml.css.CssBorderTopColorSLXHTML +border-right-color: at.gv.egiz.bku.slxhtml.css.CssBorderRightColorSLXHTML +border-left-color: at.gv.egiz.bku.slxhtml.css.CssBorderLeftColorSLXHTML +border-bottom-color: at.gv.egiz.bku.slxhtml.css.CssBorderBottomColorSLXHTML + +# Border style +# +# The border-top-style, border-bottom-style, border-left-style, border-right-style and +# border-style properties should be supported by a Citizen Card Environment. If the properties +# are supported, the predefined values none, dashed, dotted, solid and double should also +# be supported; all other values may be supported (cf. [CSS 2], section 8.5.3). + +border-top-style: org.w3c.css.properties.css1.CssBorderTopStyleCSS2 +border-right-style: org.w3c.css.properties.css1.CssBorderRightStyleCSS2 +border-left-style: org.w3c.css.properties.css1.CssBorderLeftStyleCSS2 +border-bottom-style: org.w3c.css.properties.css1.CssBorderBottomStyleCSS2 + +# Shorthand +# +# The properties for the shorthand version of the border properties (border-top, +# border-bottom, border-left, border-right and border (cf. [CSS 2], section 8.5.4) +# should be supported by a Citizen Card Environment. The recommended values result +# from the three previous sections. + +border-width: org.w3c.css.properties.css1.CssBorderWidthCSS2 +border-color: at.gv.egiz.bku.slxhtml.css.CssBorderColorSLXHTML +border-style: org.w3c.css.properties.css1.CssBorderStyleCSS2 +border-top: org.w3c.css.properties.css1.CssBorderTopCSS2 +border-right: org.w3c.css.properties.css1.CssBorderRightCSS2 +border-left: org.w3c.css.properties.css1.CssBorderLeftCSS2 +border-bottom: org.w3c.css.properties.css1.CssBorderBottomCSS2 +border: at.gv.egiz.bku.slxhtml.css.CssBorderSLXHTML + +# +# Positioning of boxes +# + +# Box type +# +# The property for controlling the box type (display) may be supported by a Citizen +# Card Environment (cf. [CSS 2], section 9.2). + +display: org.w3c.css.properties.css1.CssDisplayCSS2 + +# Positioning scheme +# +# The property for defining the positioning scheme for a box (position, cf. [CSS 2], +# section 9.3) must not be contained in an instance document to prevent content +# from overlapping. Otherwise the instance document must be rejected by the Citizen +# Card Environment. + +#! position: org.w3c.css.properties.css1.CssPosition + +# Box spacing +# +# The property for defining the positioning scheme for a box (top, bottom, left, right; +# cf. [CSS 2], section 9.3) must not be contained in an instance document to prevent +# content from overlapping. Otherwise the instance document must be rejected by the +# Citizen Card Environment. + +#! top: org.w3c.css.properties.css1.CssTop +#! right: org.w3c.css.properties.css1.CssRight +#! left: org.w3c.css.properties.css1.CssLeft +#! bottom: org.w3c.css.properties.css1.CssBottom + +# Flow around boxes +# +# The properties for defining the flow around boxes (float, clear) may be supported by +# a Citizen Card Environment (cf. [CSS 2], section 9.5). + +float: org.w3c.css.properties.css1.CssFloat +clear: org.w3c.css.properties.css1.CssClear + +# Positioning of boxes on the z-axis +# +# The property for defining the positioning of boxes on the z-axis (z-index, cf. [CSS 2], +# section 9.9) must not be contained in an instance document to prevent content from +# overlapping. Otherwise the instance document must be rejected by the Citizen Card Environment. + +#! z-index: org.w3c.css.properties.css1.CssZIndex + +# Text direction +# +# The properties for controlling the text direction (direction, unicode-bidi) may be +# supported by a Citizen Card Environment (cf. [CSS 2], section 9.10). + +direction: org.w3c.css.properties.css1.CssDirection +unicode-bidi: org.w3c.css.properties.css1.CssUnicodeBidi + +# +# Displaying boxes +# + +# Width and height +# +# The properties for specifying the width and height of a box (width, height, cf. [CSS 2], +# sections 10.2 and 10.5) must not be supported by a Citizen Card Environment to prevent +# content from overlapping. Otherwise the instance document must be rejected by the +# Citizen Card Environment. +# +# The properties for specifying the minimum width and height of a box (min-width, min-height) +# may be supported by a Citizen Card Environment (cf. [CSS 2], sections 10.4 and 10.7). +# +# The properties for specifying the maximum width and height of a box (max-width, max-height, +# cf. [CSS 2], sections 10.4 and 10.7) must not be supported by a Citizen Card Environment +# to prevent content from overlapping. Otherwise the instance document must be rejected by +# the Citizen Card Environment. + +#! width: org.w3c.css.properties.css1.CssWidth +min-width: org.w3c.css.properties.css1.CssMinWidth +#! max-width: org.w3c.css.properties.css1.CssMaxWidth +min-height: org.w3c.css.properties.css1.CssMinHeight +#! max-height: org.w3c.css.properties.css1.CssMaxHeight +#! height: org.w3c.css.properties.css1.CssHeight + +# Line height +# +# The properties for specifying the line height (line-height, vertical-align) should be +# supported by a Citizen Card (cf. [CSS 2], section 10.8). The only exception is the +# vertical-align property: In this case a Citizen Card Environment must be able to interpret +# the values sub and super. + +line-height: org.w3c.css.properties.css1.CssLineHeightCSS2 +vertical-align: org.w3c.css.properties.css1.CssVerticalAlign + +# +# Visible area in boxes +# + +# The property for specifying the visibility of a box (visibility) may be supported by a +# Citizen Card Environment (cf. [CSS 2], section 11). +# +# The properties for controlling the visible area of a box (overflow, clip; cf. [CSS 2], +# section 11) must not be contained in an instance document to prevent hidden content. Otherwise +# the instance document must be rejected by the Citizen Card Environment. + +#! overflow: org.w3c.css.properties.css1.CssOverflow +#! clip: org.w3c.css.properties.css1.CssClip +visibility: org.w3c.css.properties.css1.CssVisibility + +# +# Generated content, numbering, lists +# + +# Generated content +# +# The property for generating content (content) may be supported by a Citizen Card Environment +# (cf. [CSS 2], section 12.2). + +content: org.w3c.css.properties.css1.CssContentCSS2 + +# Displaying quotation marks +# +# The property for displaying quotation marks (quotes) may be supported by a Citizen Card +# Environment (cf. [CSS 2], section 12.3). + +quotes: org.w3c.css.properties.css1.CssQuotes + +# Numbering +# +# The properties for automatic numbering (counter-reset, counter-increment) may be supported +# by a Citizen Card Environment (cf. [CSS 2], section 12.5). + +counter-reset: org.w3c.css.properties.css1.CssCounterReset +counter-increment: org.w3c.css.properties.css1.CssCounterIncrement + +# +# Markers and lists +# + +# Marker spacing +# +# The property for defining the space between a marker and the associated box +# (marker-offset) may be supported by a Citizen Card Environment (cf. [CSS 2], +# section 12.6.1). + +marker-offset: org.w3c.css.properties.css1.CssMarkerOffset + +# List symbols +# +# For the property for selecting the list symbol (list-style-type) a Citizen +# Card Environment must support the values none, disc, circle, square, decimal, +# decimal-leading-zero, lower-roman, upper-roman, lower-alpha, lower-latin, +# upper-alpha and upper-latin. The other values may be supported (cf. [CSS 2], +# section 12.6.2). + +list-style-type: org.w3c.css.properties.css1.CssListStyleTypeCSS2 + +# Position of the list symbol +# +# The property for positioning the list symbol in relation to the associated box +# (list-style-position) should be supported by a Citizen Card Environment (cf. [CSS 2], +# section 12.6.2). + +list-style-position: org.w3c.css.properties.css1.CssListStylePositionCSS2 + +# Image as a list symbol +# +# The property for selecting an image as a list symbol (list-style-image) may be supported +# by a Citizen Card Environment (cf. [CSS 2], section 12.6.2). If the Citizen Card Environment +# supports this property, then it must proceed in respect of the integration of the image +# in the signature as described in section 2.1.7. + +# optional, not supported: +#! list-style-image: org.w3c.css.properties.css1.CssListStyleImageCSS2 + +# Shorthand +# +# The property for the shorthand version of the list properties (list-style) should be supported +# by a Citizen Card Environment. The recommended values result from the explanations for the +# list-style-type, list-style-position and list-style-image properties above (cf. [CSS 2], +# section 12.6.2). + +list-style: org.w3c.css.properties.css1.CssListStyleCSS2 + +# Page-based media +# +# The properties for page-based media may be supported by a Citizen Card Environment (size, marks, +# page-break-before, page-break-inside, page-break-after, page, orphans and widows (cf. [CSS 2], +# section 13). + +page-break-before: org.w3c.css.properties.paged.PageBreakBefore +page-break-after: org.w3c.css.properties.paged.PageBreakAfter +page-break-inside: org.w3c.css.properties.paged.PageBreakInside +page: org.w3c.css.properties.paged.Page +orphans: org.w3c.css.properties.paged.Orphans +widows: org.w3c.css.properties.paged.Widows + +@page.size: org.w3c.css.properties.paged.Size +@page.marks: org.w3c.css.properties.paged.Marks +@page.page-break-before: org.w3c.css.properties.paged.PageBreakBefore +@page.page-break-after: org.w3c.css.properties.paged.PageBreakAfter +@page.page-break-inside: org.w3c.css.properties.paged.PageBreakInside +@page.page: org.w3c.css.properties.paged.Page +@page.orphans: org.w3c.css.properties.paged.Orphans +@page.widows: org.w3c.css.properties.paged.Widows + + +# +# Colours and background +# + +# A Citizen Card Environment must support all the options for specifying a colour listed in [CSS 2], +# section 4.3.6 for a CSS property, if such an option is available for this property according to [CSS 2]. +# +# The exceptions are the system colours (cf. [CSS 2], section 18.2); these must not be used in an +# instance document so as to prevent dependencies on the system environment. Otherwise the instance +# document must be rejected by the Citizen Card Environment. + +# Colour + +# The property for defining the foreground colour of the content of an element (color) must be +# supported by a Citizen Card Environment (cf. [CSS 2], section 14.1). + +color: at.gv.egiz.bku.slxhtml.css.CssColorSLXHTML + +# Background +# +# The property for defining the background colour of the content of an element (background-color) +# must be supported by a Citizen Card Environment (cf. [CSS 2], section 14.2.1). +# +# The properties for selecting and controlling an image as background (background-image, background-repeat, +# background-position, background-attachment; cf. [CSS 2], section 14.2.1) must not be contained in an +# instance document to prevent content from overlapping. Otherwise the instance document must be +# rejected by the Citizen Card Environment. + +# The property for the shorthand version of the background properties (background) should be supported +# by a Citizen Card Environment. The recommended values result from the explanations for the background-color +# property above (cf. [CSS 2], section 14.2.1). If the property contains values for selecting and controlling +# an image as background, the instance document must be rejected by the Citizen Card Environment. + +background-color: at.gv.egiz.bku.slxhtml.css.CssBackgroundColorSLXHTML +#! background-image: org.w3c.css.properties.css1.CssBackgroundImageCSS2 +#! background-repeat: org.w3c.css.properties.css1.CssBackgroundRepeatCSS2 +#! background-attachment: org.w3c.css.properties.css1.CssBackgroundAttachmentCSS2 +#! background-position: org.w3c.css.properties.css1.CssBackgroundPositionCSS2 +background: at.gv.egiz.bku.slxhtml.css.CssBackgroundSLXHTML + +# +# Fonts +# +# +# For the property for selecting a font family (font-family), a Citizen Card Environment must +# support the predefined values serif, sans-serif and monospaced for the general font families. +# All other values may be supported by a Citizen Card Environment (cf. [CSS 2], section 15.2.2). +# +# If a preferred font family is specified in the instance document that cannot be displayed by the +# Citizen Card Environment, then the Citizen Card Environment may still display the instance +# document if another displayable font family has been specified as an alternative. For example, +# if the specification in the instance document is font-family: "Times New Roman", serif, then the +# Citizen Card Environment may display the instance document in the secure viewer even if it does +# not know the Times New Roman font family (as it must always support serif). + +font-family: org.w3c.css.properties.css1.CssFontFamilyCSS2 + +# Font style +# +# The properties for defining the font style (font-style) and font weight (font-weight) +# must be supported by a Citizen Card Environment. The values normal and italic must be supported, +# while the value oblique should be supported. +# +# The property for defining the font variant (font-variant) should be supported by a Citizen Card +# Environment, while the property for defining the font stretch (font-stretch) may be supported +# by a Citizen Card Environment (cf. [CSS 2], section 15.2.3). + +font-style: org.w3c.css.properties.css1.CssFontStyleCSS2 +font-weight: org.w3c.css.properties.css1.CssFontWeightCSS2 +font-variant: org.w3c.css.properties.css1.CssFontVariantCSS2 +font-stretch: org.w3c.css.properties.css1.CssFontStretchCSS2 + +# Font size +# +# The property for specifying the font size (font-size) must be supported by a Citizen +# Card Environment. The property for specifying the stretch ratio (font-size-adjust) may +# be supported by a Citizen Card Environment (cf. [CSS 2], section 15.2.4). + +font-size: org.w3c.css.properties.css1.CssFontSizeCSS2 +font-size-adjust: org.w3c.css.properties.css1.CssFontSizeAdjustCSS2 + +# Shorthand +# +# The property for the shorthand version of the font properties (font) should be supported by +# a Citizen Card Environment (cf. [CSS 2], section 15.2.5). The recommended values result from +# the explanations above for the font-style, font-variant, font-weight, font-size and font-family +# properties and the explanations for the line-height property in section 3.5.4.2. +# +# The additional, predefined values relating to the system fonts used (caption, icon, etc.) must +# not be contained in an instance document so as to prevent dependencies on the system environment. +# Otherwise the instance document must be rejected by the Citizen Card Environment. + +font: at.gv.egiz.bku.slxhtml.css.CssFontSLXHTML + +# +# Displaying text +# + +# Non-displayable characters +# +# If the text of an instance document contains a character that cannot be displayed by the +# Citizen Card Environment, then the instance document must be rejected by the Citizen Card +# Environment. The character must not be represented by a placeholder. + +# FIXME: How to implement?! + +# Indent +# +# The property for indenting the first line of a text block (text-indent) should be supported +# by a Citizen Card Environment (cf. [CSS 2], section 16.1). + +text-indent: org.w3c.css.properties.css1.CssTextIndent + +# Alignment +# +# For the property for aligning the content of a text block (text-align) a Citizen Card Environment +# must support the values left, right and center. The value justified should be supported, +# while the specification of a string value may be supported (cf. [CSS 2], section 16.2). + +text-align: org.w3c.css.properties.css1.CssTextAlign + +# Text decoration +# +# For the property for decorating a text (text-decoration; cf. [CSS 2], section 16.3.1) a +# Citizen Card Environment must support the values none, underline and line-through. +# +# The value blink must not be contained in an instance document. Otherwise the instance +# document must be rejected by the Citizen Card Environment. +# +# The other values may be supported by a Citizen Card Environment. + +text-decoration: at.gv.egiz.bku.slxhtml.css.CssTextDecorationSLXHTML + +# Shadows +# +# The property for specifying a text shadow (text-shadow) may be supported by a Citizen Card +# Environment (cf. [CSS 2], section 16.3.2). + +text-shadow: org.w3c.css.properties.css1.CssTextShadow + +# Word and letter spacing +# +# The word-spacing and letter-spacing should be supported by a Citizen Card Environment +# (cf. [CSS 2], section 16.4). +# +# An instance document must not contain negative values in order to prevent content from +# overlapping. Otherwise the instance document must be rejected by the Citizen Card Environment. + +word-spacing: at.gv.egiz.bku.slxhtml.css.CssWordSpacingSLXHTML +letter-spacing: at.gv.egiz.bku.slxhtml.css.CssLetterSpacingSLXHTML + +# Capitalisation +# +# The property for specifying the capitalisation of the text of an element (text-transform) +# may be supported by a Citizen Card Environment (cf. [CSS 2], section 16.5). + +text-transform: org.w3c.css.properties.css1.CssTextTransform + +# White space +# +# The property for the handling of white space within the text of an element (white-space) should +# be supported by a Citizen Card Environment (cf. [CSS 2], section 16.6). + +white-space: org.w3c.css.properties.css1.CssWhiteSpace + +# +# Tables +# + +# Position of caption +# +# A Citizen Card Environment should support the top and bottom properties for the property for +# specifying the position when labelling a table (caption-side); the properties left and right +# may be supported (cf. [CSS 2], section 17.4.1). + +caption-side: org.w3c.css.properties.css2.table.CaptionSide + +# Layout algorithm +# +# The property for defining the layout algorithm for a table (table-layout) may be supported by +# a Citizen Card Environment (cf. [CSS 2], section 17.5.2). +# +# However, the fixed value must not be supported because the layout algorithm selected with it can +# cause content to overlap. +# +# In general, the viewer component of the Citizen Card Environment must use a layout algorithm for a +# table that does not generate an overflow, in other words with which the content of every table +# element can be rendered so that it does not extend beyond the confines of the table element. +# There is an example of such an algorithm in [CSS 2], section 17.5.2, subsection Automatic table layout. + +table-layout: at.gv.egiz.bku.slxhtml.css.TableLayoutSLXHTML +row-span: org.w3c.css.properties.css2.table.RowSpan +column-span: org.w3c.css.properties.css2.table.ColumnSpan + +# Borders +# +# The properties for displaying borders in tables (border-collapse, border-spacing, empty-cells) may +# be supported by a Citizen Card Environment (cf. [CSS 2], section 17.6). + +border-collapse: org.w3c.css.properties.css2.table.BorderCollapse +border-spacing: org.w3c.css.properties.css2.table.BorderSpacing +empty-cells: org.w3c.css.properties.css2.table.EmptyCells + +# Voice output +# +# The property for controlling the voice output of the column headers in a table (speak-header) may +# be supported by a Citizen Card Environment (cf. [CSS 2], section 17.7.1). + +speak-header: org.w3c.css.properties.css2.table.SpeakHeader + +# +# User interface +# + +# Cursor format +# +# The property for controlling the cursor format (cursor; cf. [CSS 2], section 18.1) must not be +# contained in an instance document. Otherwise the instance document must be rejected by the Citizen +# Card Environment. + +#! cursor: org.w3c.css.properties.css2.user.CursorCSS2 + +# Contours +# +# The properties for defining element contours (outline-width, outline-style, outline-color and +# outline; cf. [CSS 2], section 18.4) must not be contained in an instance document. Otherwise the +# instance document must be rejected by the Citizen Card Environment. + +#! outline: org.w3c.css.properties.css2.user.Outline +#! outline-width: org.w3c.css.properties.css2.user.OutlineWidth +#! outline-style: org.w3c.css.properties.css2.user.OutlineStyle +#! outline-color: org.w3c.css.properties.css2.user.OutlineColor + +# +# Aural Properties +# +# The properties for the voice output of a document (cf. [CSS 2], section 19) may be supported +# by a Citizen Card Environment. + +volume: org.w3c.css.properties.aural.ACssVolume +pause-before: org.w3c.css.properties.aural.ACssPauseBefore +pause-after: org.w3c.css.properties.aural.ACssPauseAfter +pause: org.w3c.css.properties.aural.ACssPause +cue-before: org.w3c.css.properties.aural.ACssCueBefore +cue-after: org.w3c.css.properties.aural.ACssCueAfter +cue: org.w3c.css.properties.aural.ACssCue +play-during: org.w3c.css.properties.aural.ACssPlayDuring +voice-family: org.w3c.css.properties.aural.ACssVoiceFamily +elevation: org.w3c.css.properties.aural.ACssElevation +speech-rate: org.w3c.css.properties.aural.ACssSpeechRate +pitch: org.w3c.css.properties.aural.ACssPitch +pitch-range: org.w3c.css.properties.aural.ACssPitchRange +stress: org.w3c.css.properties.aural.ACssStress +richness: org.w3c.css.properties.aural.ACssRichness +speak-punctuation: org.w3c.css.properties.aural.ACssSpeakPunctuation +speak-date: org.w3c.css.properties.aural.ACssSpeakDate +speak-numeral: org.w3c.css.properties.aural.ACssSpeakNumeral +speak-time: org.w3c.css.properties.aural.ACssSpeakTime +speak: org.w3c.css.properties.aural.ACssSpeak +azimuth: org.w3c.css.properties.aural.ACssAzimuth + +# +# @page +# +# The @page rule for defining the page properties for page-based output media may be +# supported by a Citizen Card Environment (cf. [CSS 2], section 13, and section 3.5.7 +# of this document). +# + +@page.margin-top: org.w3c.css.properties.css1.CssMarginTop +@page.margin-bottom: org.w3c.css.properties.css1.CssMarginBottom +@page.margin-left: org.w3c.css.properties.css1.CssMarginLeft +@page.margin-right: org.w3c.css.properties.css1.CssMarginRight +@page.margin: org.w3c.css.properties.css1.CssMargin +@page.padding-top: org.w3c.css.properties.css1.CssPaddingTop +@page.padding-bottom: org.w3c.css.properties.css1.CssPaddingBottom +@page.padding-left: org.w3c.css.properties.css1.CssPaddingLeft +@page.padding-right: org.w3c.css.properties.css1.CssPaddingRight +@page.padding: org.w3c.css.properties.css1.CssPadding +@page.border-top-width: org.w3c.css.properties.css1.CssBorderTopWidthCSS2 +@page.border-right-width: org.w3c.css.properties.css1.CssBorderRightWidthCSS2 +@page.border-left-width: org.w3c.css.properties.css1.CssBorderLeftWidthCSS2 +@page.border-bottom-width: org.w3c.css.properties.css1.CssBorderBottomWidthCSS2 +@page.border-top-color: org.w3c.css.properties.css1.CssBorderTopColorCSS2 +@page.border-right-color: org.w3c.css.properties.css1.CssBorderRightColorCSS2 +@page.border-left-color: org.w3c.css.properties.css1.CssBorderLeftColorCSS2 +@page.border-bottom-color: org.w3c.css.properties.css1.CssBorderBottomColorCSS2 +@page.border-top-style: org.w3c.css.properties.css1.CssBorderTopStyleCSS2 +@page.border-right-style: org.w3c.css.properties.css1.CssBorderRightStyleCSS2 +@page.border-left-style: org.w3c.css.properties.css1.CssBorderLeftStyleCSS2 +@page.border-bottom-style: org.w3c.css.properties.css1.CssBorderBottomStyleCSS2 +@page.border-width: org.w3c.css.properties.css1.CssBorderWidthCSS2 +@page.border-color: org.w3c.css.properties.css1.CssBorderColorCSS2 +@page.border-style: org.w3c.css.properties.css1.CssBorderStyleCSS2 +@page.border-top: org.w3c.css.properties.css1.CssBorderTopCSS2 +@page.border-right: org.w3c.css.properties.css1.CssBorderRightCSS2 +@page.border-left: org.w3c.css.properties.css1.CssBorderLeftCSS2 +@page.border-bottom: org.w3c.css.properties.css1.CssBorderBottomCSS2 +@page.border: org.w3c.css.properties.css1.CssBorderCSS2 +@page.display: org.w3c.css.properties.css1.CssDisplayCSS2 +@page.position: org.w3c.css.properties.css1.CssPosition +@page.z-index: org.w3c.css.properties.css1.CssZIndex +@page.direction: org.w3c.css.properties.css1.CssDirection +@page.unicode-bidi: org.w3c.css.properties.css1.CssUnicodeBidi +@page.top: org.w3c.css.properties.css1.CssTop +@page.right: org.w3c.css.properties.css1.CssRight +@page.left: org.w3c.css.properties.css1.CssLeft +@page.bottom: org.w3c.css.properties.css1.CssBottom +@page.float: org.w3c.css.properties.css1.CssFloat +@page.clear: org.w3c.css.properties.css1.CssClear + +# +# @font-face +# +# The @font-face rule for describing or referencing additional font families (cf. [CSS 2], +# section 15.3) must not be used in an instance document. The viewer component of the Citizen +# Card Environment must reject an instance document containing a @font-face rule. + +#! @font-face.font-style: org.w3c.css.properties.css2.font.FontStyle +#! @font-face.font-variant: org.w3c.css.properties.css2.font.FontVariant +#! @font-face.font-weight: org.w3c.css.properties.css2.font.FontWeight +#! @font-face.font-size: org.w3c.css.properties.css2.font.FontSize +#! @font-face.font-family: org.w3c.css.properties.css2.font.FontFamily +#! @font-face.font-stretch: org.w3c.css.properties.css2.font.FontStretch +#! @font-face.unicode-range: org.w3c.css.properties.css2.font.UnicodeRange +#! @font-face.units-per-em: org.w3c.css.properties.css2.font.UnitsPerEm +#! @font-face.src: org.w3c.css.properties.css2.font.Src +#! @font-face.panose-1: org.w3c.css.properties.css2.font.Panose1 +#! @font-face.stemv: org.w3c.css.properties.css2.font.Stemv +#! @font-face.stemh: org.w3c.css.properties.css2.font.Stemh +#! @font-face.slope: org.w3c.css.properties.css2.font.Slope +#! @font-face.cap-height: org.w3c.css.properties.css2.font.CapHeight +#! @font-face.x-hegiht: org.w3c.css.properties.css2.font.XHeight +#! @font-face.widths: org.w3c.css.properties.css2.font.Widths +#! @font-face.ascent: org.w3c.css.properties.css2.font.Ascent +#! @font-face.descent: org.w3c.css.properties.css2.font.Descent +#! @font-face.bbox: org.w3c.css.properties.css2.font.Bbox +#! @font-face.baseline: org.w3c.css.properties.css2.font.Baseline +#! @font-face.centerline: org.w3c.css.properties.css2.font.Centerline +#! @font-face.definition-src: org.w3c.css.properties.css2.font.DefinitionSrc +#! @font-face.mathline: org.w3c.css.properties.css2.font.Mathline +#! @font-face.topline: org.w3c.css.properties.css2.font.Topline diff --git a/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java new file mode 100644 index 00000000..c5b54a56 --- /dev/null +++ b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java @@ -0,0 +1,67 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml; + +import static org.junit.Assert.assertNotNull; + +import java.io.InputStream; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Ignore; +import org.junit.Test; + +import at.gv.egiz.bku.viewer.ValidationException; +import at.gv.egiz.bku.viewer.Validator; +import at.gv.egiz.bku.viewer.ValidatorFactory; + +//@Ignore +public class ValidatorTest { + + private static Log log = LogFactory.getLog(ValidatorTest.class); + + @Test + public void testGetInstance() { + + Validator validator = ValidatorFactory.newValidator("application/xhtml+xml"); + + assertNotNull(validator); + + } + + @Test + public void testValidate() throws ValidationException { + + String slxhtmlFile = "at/gv/egiz/bku/slxhtml/zugang.xhtml"; + + Validator validator = ValidatorFactory.newValidator("application/xhtml+xml"); + + ClassLoader cl = ValidatorTest.class.getClassLoader(); + InputStream slxhtml = cl.getResourceAsStream(slxhtmlFile); + long t0 = System.currentTimeMillis(); + try { + validator.validate(slxhtml, null); + } catch (ValidationException e) { + e.printStackTrace(); + throw e; + } + long t1 = System.currentTimeMillis(); + log.info("Validated SLXHTML file '" + slxhtmlFile + "' in " + (t1 - t0) + "ms."); + + } + +} diff --git a/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/css/CssValidatorTest.java b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/css/CssValidatorTest.java new file mode 100644 index 00000000..2b4740f9 --- /dev/null +++ b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/css/CssValidatorTest.java @@ -0,0 +1,75 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.bku.slxhtml.css; + +import static org.junit.Assert.*; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.util.Locale; +import java.util.Properties; +import java.util.Set; + +import org.junit.Test; + +import at.gv.egiz.bku.viewer.ValidationException; + +public class CssValidatorTest { + + @Test + public void testProperties() throws IOException { + + ClassLoader cs = CssValidatorTest.class.getClassLoader(); + InputStream is = cs.getResourceAsStream("org/w3c/css/properties/SLXHTMLProperties.properties"); + + assertNotNull(is); + + Properties cssProperties = new Properties(); + cssProperties.load(is); + + Set<String> names = cssProperties.stringPropertyNames(); + for (String name : names) { + String className = cssProperties.getProperty(name); + try { + Class.forName(className); + } catch (ClassNotFoundException e) { + fail("Implementation class '" + className + "' for property '" + name + "' not found."); + } + + } + + } + + @Test(expected=ValidationException.class) + public void testValidator() throws UnsupportedEncodingException, ValidationException { + + String css = "@charset \"ABCDEFG\";\n" + + " @import url(http://test.abc/test); * { color: black }"; + ByteArrayInputStream input = new ByteArrayInputStream(css.getBytes("UTF-8")); + + CSSValidatorSLXHTML validator = new CSSValidatorSLXHTML(); + + Locale locale = new Locale("de"); + + validator.validate(input, locale, "Test", 10); + + } + + +} diff --git a/BKUViewer/src/test/java/at/gv/egiz/bku/text/TestTextValidator.java b/BKUViewer/src/test/java/at/gv/egiz/bku/text/TestTextValidator.java new file mode 100644 index 00000000..8db459e7 --- /dev/null +++ b/BKUViewer/src/test/java/at/gv/egiz/bku/text/TestTextValidator.java @@ -0,0 +1,218 @@ +/* + * Copyright 2008 Federal Chancellery Austria and + * Graz University of Technology + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package at.gv.egiz.bku.text; + +import static org.junit.Assert.*; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; + +import org.junit.Ignore; +import org.junit.Test; + +import at.gv.egiz.bku.viewer.ValidationException; +import at.gv.egiz.bku.viewer.Validator; +import at.gv.egiz.bku.viewer.ValidatorFactory; + +public class TestTextValidator { + + public static byte[] generateText(String encoding) throws UnsupportedEncodingException { + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + PrintWriter writer = new PrintWriter(new OutputStreamWriter(bos, encoding)); + + writer.write("C0 Controls and Basic Latin 0x0009-0x000A"); + writer.write("\n"); + for (char c = '\t'; c <= '\n'; c++) { + writer.write(c); + } + writer.write("\n"); + // errata: don't include FORM FEED (0x000C) + writer.write("C0 Controls and Basic Latin 0x000D"); + writer.write("\n"); + +// for (char c = '\f'; c <= '\r'; c++) { +// writer.write(c); +// } + + writer.write("\r"); + writer.write("\n"); + writer.write("C0 Controls and Basic Latin 0x0020-0x007E"); + writer.write("\n"); + for (char c = '\u0020'; c <= '\u007E'; c++) { + writer.write(c); + } + writer.write("\n"); + writer.write("C1 Controls and Latin-1 Supplement 0x00A1-0x00FF"); + writer.write("\n"); + for (char c = '\u00A1'; c <= '\u00FF'; c++) { + writer.write(c); + } + writer.write("\n"); + writer.write("Latin Extended-A 0x0100-0x017F"); + writer.write("\n"); + for (char c = '\u0100'; c <= '\u017F'; c++) { + writer.write(c); + } + writer.write("\n"); + writer.write("Spacing Modifier Letters 0x02C7"); + writer.write("\n"); + writer.write("\u02C7"); + writer.write("\n"); + writer.write("Spacing Modifier Letters 0x02D8"); + writer.write("\n"); + writer.write("\u02D8"); + writer.write("\n"); + writer.write("Spacing Modifier Letters 0x02D9"); + writer.write("\n"); + writer.write("\u02D9"); + writer.write("\n"); + writer.write("Spacing Modifier Letters 0x02DB"); + writer.write("\n"); + writer.write("\u02DB"); + writer.write("\n"); + writer.write("Spacing Modifier Letters 0x02DD"); + writer.write("\n"); + writer.write("\u02DD"); + writer.write("\n"); + writer.write("General Punctuation 0x2015"); + writer.write("\n"); + writer.write("\u2015"); + writer.write("\n"); + writer.write("Currency Symbols 0x20AC"); + writer.write("\n"); + writer.write("\u20AC"); + writer.flush(); + + return bos.toByteArray(); + + } + + public void testTextValidation(String encoding) throws ValidationException, UnsupportedEncodingException { + + Validator validator = ValidatorFactory.newValidator("text/plain"); + + assertNotNull(validator); + + InputStream is = new ByteArrayInputStream(generateText(encoding)); + + assertNotNull(is); + + validator.validate(is, encoding); + + } + + @Test + public void testUTF8() throws ValidationException, UnsupportedEncodingException { + testTextValidation("UTF-8"); + } + + @Test + public void testISO8859_1() throws ValidationException, UnsupportedEncodingException { + testTextValidation("ISO-8859-1"); + } + + @Test + public void testISO8859_2() throws ValidationException, UnsupportedEncodingException { + testTextValidation("ISO-8859-2"); + } + + @Test + public void testISO8859_3() throws ValidationException, UnsupportedEncodingException { + testTextValidation("ISO-8859-3"); + } + + @Test + public void testISO8859_9() throws ValidationException, UnsupportedEncodingException { + testTextValidation("ISO-8859-9"); + } + + @Ignore + @Test + public void testISO8859_10() throws ValidationException, UnsupportedEncodingException { + testTextValidation("ISO-8859-10"); + } + + @Test + public void testISO8859_15() throws ValidationException, UnsupportedEncodingException { + testTextValidation("ISO-8859-15"); + } + + @Test + public void testPerformance() throws UnsupportedEncodingException, ValidationException { + Validator validator = ValidatorFactory.newValidator("text/plain"); + + assertNotNull(validator); + + //!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϒϓϔϕϖϗϘϙϚϛϜϝϞϟϠϡЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџҐґҒғҔҕҖҗҘҙҚқҰұҲҳӀӁӂӃӄӐӑӒӓӔӕӖӗӘәӚӛӜӝӞӟӠӡӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳӴӵӶӷӸӹ + + StringBuilder data = new StringBuilder(); + //LATIN + for (int i = 0x0021; i <= 0x007e; i++) { + data.append((char) i); + } + //LATIN supplement + for (int i = 0x00A1; i <= 0x00FF; i++) { + data.append((char) i); + } + //GREEK + for (int i = 0x038e; i <= 0x03a1; i++) { + data.append((char) i); + } + for (int i = 0x03a3; i <= 0x03ce; i++) { + data.append((char) i); + } + for (int i = 0x03d0; i <= 0x03e1; i++) { + data.append((char) i); + } + //CYRILLIC + for (int i = 0x0400; i <= 0x045f; i++) { + data.append((char) i); + } + for (int i = 0x0490; i <= 0x049b; i++) { + data.append((char) i); + } + for (int i = 0x04b0; i <= 0x04b3; i++) { + data.append((char) i); + } + for (int i = 0x04c0; i <= 0x04c4; i++) { + data.append((char) i); + } + for (int i = 0x04d0; i <= 0x04f9; i++) { + data.append((char) i); + } + + StringBuilder aLotOfData = new StringBuilder(); + for (int i = 0; i < 1000; i++) { + aLotOfData.append('\n'); + aLotOfData.append(data); + } + String aLotOfText = aLotOfData.toString(); + System.out.println("validating " + aLotOfText.length() + " weird characters: " + aLotOfText); + + InputStream is = new ByteArrayInputStream(aLotOfText.getBytes("UTF-8")); + + assertNotNull(is); + + validator.validate(is, "UTF-8"); + + } +} diff --git a/BKUViewer/src/test/resources/at/gv/egiz/bku/slxhtml/test.xhtml b/BKUViewer/src/test/resources/at/gv/egiz/bku/slxhtml/test.xhtml new file mode 100644 index 00000000..cbd29551 --- /dev/null +++ b/BKUViewer/src/test/resources/at/gv/egiz/bku/slxhtml/test.xhtml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"> + <xhtml:head> + <xhtml:title>Ein einfaches SLXHTML-Dokument</xhtml:title> + <xhtml:style type="text/css">@font-face { color: red }; p { color: red; }</xhtml:style> + </xhtml:head> + <xhtml:body> + <xhtml:p>Ich bin ein einfacher Text in rot.</xhtml:p> + </xhtml:body> +</xhtml:html> diff --git a/BKUViewer/src/test/resources/at/gv/egiz/bku/slxhtml/zugang.xhtml b/BKUViewer/src/test/resources/at/gv/egiz/bku/slxhtml/zugang.xhtml new file mode 100644 index 00000000..9284d9cf --- /dev/null +++ b/BKUViewer/src/test/resources/at/gv/egiz/bku/slxhtml/zugang.xhtml @@ -0,0 +1,17 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Signatur der Anmeldedaten</title> + <style media="screen" type="text/css">.boldstyle { font-weight: bold; } .italicstyle { font-style: italic; } .annotationstyle { font-size: small; }</style> + </head> + <body> + <h1>Signatur der Anmeldedaten</h1> + <p></p> + <h4>Mit meiner elektronischen Signatur beantrage ich, <span class="boldstyle">Horst Rotzstopper</span>, geboren am 12.12.1985, den Zugang zur gesicherten Anwendung.</h4> + <p></p> + <h4>Datum und Uhrzeit: 07.11.2008, 14:04:18</h4> + <h4>wbPK(*): LTpz8VYzns2jrx0J8Gm/R/nAhxA=</h4> + <p></p> + <hr></hr> + <div class="annotationstyle">(*) wbPK: Das <span class="italicstyle">wirtschaftsbereichsspezifische Personenkennzeichen</span> wird aus den jeweiligen Stammzahlen des Bürgers und des Wirtschaftsunternehmens berechnet und ermöglicht eine eindeutige Zuordnung des Bürgers zum Wirtschaftsunternehmen.</div> + </body> +</html>
\ No newline at end of file diff --git a/BKUViewer/src/test/resources/commons-logging.properties b/BKUViewer/src/test/resources/commons-logging.properties new file mode 100644 index 00000000..29292562 --- /dev/null +++ b/BKUViewer/src/test/resources/commons-logging.properties @@ -0,0 +1 @@ +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/BKUViewer/src/test/resources/log4j.properties b/BKUViewer/src/test/resources/log4j.properties new file mode 100644 index 00000000..053eac17 --- /dev/null +++ b/BKUViewer/src/test/resources/log4j.properties @@ -0,0 +1,19 @@ +# loglever DEBUG, appender STDOUT +log4j.rootLogger=TRACE, STDOUT +#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT + +# STDOUT appender +log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender +log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n +#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +log4j.appender.STDOUT.layout.ConversionPattern=%-5p |%d | %t | %c %x- %m%n + +### FILE appender +#log4j.appender.file=org.apache.log4j.RollingFileAppender +#log4j.appender.file.maxFileSize=100KB +#log4j.appender.file.maxBackupIndex=9 +#log4j.appender.file.File=egovbus_ca.log +#log4j.appender.file.threshold=info +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
\ No newline at end of file |