Giter Club home page Giter Club logo

epubcheck-xproc's People

Contributors

gimsieke avatar janschilbach avatar mkraetke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pglatza

epubcheck-xproc's Issues

stylesheet encoding

Parsing of CSS stylesheet fails if encoding is different than UTF-8.

Invoke calabash with

xproc Martin$ calabash -i source=example.xhtml test-css.xpl

results in this output:

26.09.2011 16:26:29 com.xmlcalabash.util.DefaultXProcMessageListener error
SCHWERWIEGEND: file:/xsl/css-parser.xsl:31:err:XTDE1200:Failed to read input file file:/Users/Martin/workspace/epubcheck-xproc/xproc/standard-epub-2-0/OEBPS/stylesheet.css (java.nio.charset.MalformedInputException)
26.09.2011 16:26:29 com.xmlcalabash.util.DefaultXProcMessageListener error
SCHWERWIEGEND: Failed to read input file file:/xproc/standard-epub-2-0/OEBPS/stylesheet.css (java.nio.charset.MalformedInputException)
26.09.2011 16:26:30 com.xmlcalabash.util.DefaultXProcMessageListener error
SCHWERWIEGEND: Failed to read input file file:/xproc/standard-epub-2-0/OEBPS/stylesheet.css (java.nio.charset.MalformedInputException)
26.09.2011 16:26:30 com.xmlcalabash.drivers.Main error
SCHWERWIEGEND: Pipeline failed: net.sf.saxon.s9api.SaxonApiException: Failed to read input file file:/xproc/standard-epub-2-0/OEBPS/stylesheet.css (java.nio.charset.MalformedInputException)
26.09.2011 16:26:30 com.xmlcalabash.drivers.Main error
SCHWERWIEGEND: Underlying exception: net.sf.saxon.trans.XPathException: Failed to read input file file:/xproc/standard-epub-2-0/OEBPS/stylesheet.css (java.nio.charset.MalformedInputException)

CSS parser: ambiguous rule matches when multiple classes are attached to an element

err:XTRE0540:Ambiguous rule match for /html/body[1]/div[1]/p[58]
Matches both "[matches(@Class,'(^|\s)foo(\s|$)')]" on line -1 of
and "
[matches(@Class,'(^|\s)bar(\s|$)')]"

Possible solution:
– Don’t write rules for processing elements. Write rules for processing @Class attribute tokens.
– Tokenize each class attribute.
– Process each token

What are the precedence rules for the tokens? The last token’s declarations win? This should translate well to attributes being created by template rules that process each token.

Another consideration: because in XSLT 2, template rules may not be declared to match a string, should css2xsl.xsl create named templates for each token? (<xsl:template name="class-foo">…) Will this capture the different priorities / important declarations?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.