Skip to content
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

HTML element tools #5

Open
3 tasks
asg017 opened this issue Oct 20, 2021 · 1 comment
Open
3 tasks

HTML element tools #5

asg017 opened this issue Oct 20, 2021 · 1 comment
Milestone

Comments

@asg017
Copy link
Owner

asg017 commented Oct 20, 2021

  • html_element(tag, attributes, child1, child2, ....)
  • html_attributes(attr1, attr2, ...) (or html_attrs)
    • html_attribute(name, value, namespace) (or html_attr()
-- https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
select 
html_element('html', null, 
  html_element('head', null, 
    html_element('meta', html_attributes('charset', 'utf-8')), 
    html_element('title', null, 'My test page'),
  ),
  html_element('body', null,
    html_element('img', html_attributes('src', 'images/firefox-icon.png', 'alt', 'My test image')),
  )
);
@asg017 asg017 added this to the 2 v0 milestone Oct 20, 2021
@asg017
Copy link
Owner Author

asg017 commented Oct 20, 2021

aggregate functions?

select html_element('table', null,
  -- thead stuff...
  html_element('tbody', null, 
    html_element_agg('tr', null, 
      html_element('td', null, name),
      html_element('td', null, value),
    )
  )
)
from measurements;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant