I wanted to know if the CSSTreeParser encountered some Problems while parsing the CSS into the Stylesheet.
You have a lot of Logging for all the Errors, but There is no way to get that information from the Parser or Stylesheet itself. In the CssTreeParser I found the Classes: declaration_scope, statement_scope and combined_selector_scope. All having a Property named invalid.
I thought that I can track for errors by setting
this.invalid = this.invalid || true;
everywhere where you set this invalid Property to true.
Is this OK, or would this lead to false Positives or would I miss some Errors by just doing that?
Regards,
Hannes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Hannes, I am glad you have solved the problem. I have been thinking about your previous solution but I think it would not propagate the "invalid" flag to the tree root. I mean it would be better to traverse the resulting tree after parsing and find the invalid nodes. However, not all errors that may occur in the CSS code have to be represented by a "invalid" node. In other words, using a validator is a better solution.
Regards
Radek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I wanted to know if the CSSTreeParser encountered some Problems while parsing the CSS into the Stylesheet.
You have a lot of Logging for all the Errors, but There is no way to get that information from the Parser or Stylesheet itself. In the CssTreeParser I found the Classes: declaration_scope, statement_scope and combined_selector_scope. All having a Property named invalid.
I thought that I can track for errors by setting
everywhere where you set this invalid Property to true.
Is this OK, or would this lead to false Positives or would I miss some Errors by just doing that?
Regards,
Hannes
I found a Solution for that. I use
for validating the Data first and when I know that they are OK, I will parse them using jStyle, works great!
Thank YOU!
Hello Hannes, I am glad you have solved the problem. I have been thinking about your previous solution but I think it would not propagate the "invalid" flag to the tree root. I mean it would be better to traverse the resulting tree after parsing and find the invalid nodes. However, not all errors that may occur in the CSS code have to be represented by a "invalid" node. In other words, using a validator is a better solution.
Regards
Radek