org.daisy.pipeline.css.sass.SassAnalyzer Maven / Gradle / Ivy
The newest version!
package org.daisy.pipeline.css.sass;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import javax.xml.transform.Source;
import javax.xml.transform.URIResolver;
import org.daisy.pipeline.css.Medium;
import org.daisy.pipeline.datatypes.DatatypeRegistry;
import org.daisy.pipeline.datatypes.DatatypeService;
/**
* Analyzes a style sheet and extracts information about global variables.
*/
public class SassAnalyzer {
private final org.daisy.pipeline.css.sass.impl.SassAnalyzer analyzer;
public SassAnalyzer(Medium medium, URIResolver uriResolver, DatatypeRegistry datatypes) {
this(Collections.singleton(medium), uriResolver, datatypes);
}
public SassAnalyzer(Collection media, URIResolver uriResolver, DatatypeRegistry datatypes) {
analyzer = new org.daisy.pipeline.css.sass.impl.SassAnalyzer(media, uriResolver, datatypes);
}
/**
* Get the variables declared within the given style sheets and source document.
*
* @param userAndUserAgentStylesheets {@code Source} objects must have absolute hierarchical URI as
* system ID
* @param sourceDocument {@code Source} object must have absolute hierarchical URI as system ID,
* or object may be {@code null}.
*/
public Result analyze(Iterable