-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xhtml visualization #497
base: main
Are you sure you want to change the base?
Xhtml visualization #497
Conversation
pri pridaní podpory XHTML som aj trochu refactorol vyberanie XSLT z internetu. Nie úplne všetky XHTML budú fungovať, ale ak sa niektorá používa iba na zobrazenie alebo podpisovanie, nemá v sebe také špeci fičúrky, ktoré by nefungovali. Logicky by nefungovala editácia podania. |
filterIfExist(entries, e -> e.mediaDestination().equals("sign")); | ||
filterIfExist(entries, e -> List.of("HTML", "XHTML").contains(e.destinationType())); | ||
filterIfExist(entries, e -> e.mediaDestination().equals("view")); | ||
filterIfExist(entries, e -> e.destinationType().equals("XHTML")); | ||
|
||
if (entries.stream().filter(entry -> entry.mediaDesination().equals("sign")).count() > 0) | ||
entries.removeIf(entry -> !entry.mediaDesination().equals("sign")); | ||
filterIfExist(entries, e -> e.language().equals("sk")); | ||
filterIfExist(entries, e -> e.language().equals("en")); | ||
|
||
if (entries.stream().filter(entry -> entry.destinationType().equals("XHTML")).count() > 0) | ||
entries.removeIf(entry -> !entry.destinationType().equals("XHTML")); | ||
|
||
else if (entries.stream().filter(entry -> entry.destinationType().equals("HTML")).count() > 0) | ||
entries.removeIf(entry -> !entry.destinationType().equals("HTML")); | ||
|
||
else if (entries.stream().filter(entry -> entry.destinationType().equals("TXT")).count() > 0) | ||
entries.removeIf(entry -> !entry.destinationType().equals("TXT")); | ||
|
||
if (entries.stream().filter(entry -> entry.language().equals("sk")).count() > 0) | ||
entries.removeIf(entry -> !entry.language().equals("sk")); | ||
|
||
else if (entries.stream().filter(entry -> entry.language().equals("en")).count() > 0) | ||
entries.removeIf(entry -> !entry.language().equals("en")); | ||
return entries.stream().findFirst().orElse(null); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toto pre mna je trosku zle citatelne kedze ta metoda "mutuje" entries. Predtym som videl, ze najprv sa hlada sign
potom xhtml potom html a potom txt. Tu to nevidim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mne tam vadilo, že sa príliš veľa opakovalo. Rozumiem, že metódy, ktoré menia parametre sú nešťastné. Ako kompromis by som metóde filterIfExist
dal return type entries a nebude meniť tie entries v parametri ale ich kópiu.
No description provided.