Giter Club home page Giter Club logo

cxml's People

Contributors

ferada avatar hanshuebner avatar lichtblau avatar pdenno avatar ruricolist avatar scymtym avatar svenemtell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cxml's Issues

Test suite for cxml

@ruricolist made his test suite available in a separate repository:

https://github.com/ruricolist/cxml-tests

I've made a separate repository for it because it's quite large (>30 Mb). You might decide (as I did) that keeping the test suite with the rest of the code is worth the extra size.

(The other advantage of a separate repository, of course, is that you can easily test against older versions of CXML.)

Originally posted by @ruricolist in #3 (comment)

Named readtables

I'd like to propose switching CXML to use named-readtables. It would allow removing the component classes from the .asd file, moving it in a much more declarative direction.

This isn't technically challenging (I already did it for FXML) but it would require a coordinated change across closure-common and CXML so I wanted to raise it for discussion first.

You can see the contemplated changes in these commits:

ruricolist/FXML@fd1ffd9
ruricolist/FXML@fd1ffd9

Verbose ASD loading

cxml/cxml.asd

Lines 13 to 37 in adb4430

(progn
(format t "~&;;; Checking for wide character support...")
(force-output)
(flet ((test (code)
(and (< code char-code-limit) (code-char code))))
(cond
((not (test 50000))
(format t " no, reverting to octet strings.~%")
#+rune-is-character
(error "conflicting unicode configuration. Please recompile.")
(pushnew :rune-is-integer *features*))
((test 70000)
(when (test #xD800)
(format t " WARNING: Lisp implementation doesn't use UTF-16, ~
but accepts surrogate code points.~%"))
(format t " yes, using code points.~%")
#+(or rune-is-integer rune-is-utf-16)
(error "conflicting unicode configuration. Please recompile.")
(pushnew :rune-is-character *features*))
(t
(format t " yes, using UTF-16.~%")
#+(or rune-is-integer (and rune-is-character (not rune-is-utf-16)))
(error "conflicting unicode configuration. Please recompile.")
(pushnew :rune-is-utf-16 *features*)
(pushnew :rune-is-character *features*)))))

This codeblock contributes to (IMO unnecessarily) verbose Quicklisp loads of cxml, for instance:

To load "foo-system":
  Load 1 ASDF system:
    foo-system

; Loading "foo-system"
.
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
 yes, using code points.
..
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
 yes, using code points.
;;; Building Closure with CHARACTER RUNES
...............................................
...................

Is it possible/desired to remove the FORMAT calls altogether?

Element.getBoundingClientRect()

Is it possible to call DOM's getBoundingClientRect() on an Element which i get by:

(aref (dom:get-elements-by-tag-name
       (cxml:parse-file "./test.svg" (cxml-dom:make-dom-builder))
       "path") 0)

This returns a #<RUNE-DOM::ELEMENT path {10042A87A3}> from the SVG file test.svg.

cxml looping (includes minimal reproducible case)

I have noticed that cxml is looping for a certain combination of xml/dtd. It loops in the recurse function inside compile-content-model in xml-parse.lisp. I have put a lot of time on trying to understand how the code is supposed to work but without success.
It would be great if someone knowing the code could have a look at this!

A minimal reproducible case is available here https://doremir.com/files/cxml/xml-test.zip.

The xml file from the case looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE a PUBLIC "" "">
<a>
  <c/>
</a>

And the dtd file looks like this:

<!ELEMENT b EMPTY>
<!ELEMENT c EMPTY>
<!ELEMENT a ((b?)*, c?)>

The real world case is from parsing MusicXML and the problematic xml excerpt looks like this:

<sound tempo="90">
  <offset sound="yes">8</offset>
</sound>

And the corresponding dtd excerpt looks like this:
<!ELEMENT sound ((midi-device?, midi-instrument?, play?)*, offset?)>

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.