diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..77a6d92
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,25 @@
+{
+ "html.customData": [
+ "./ide/customData-dce.json",
+ "./ide/customData-xsl.json"
+ ],
+ "terminal.integrated.profiles.windows": {
+
+ "PowerShell": {
+ "source": "PowerShell",
+ "icon": "terminal-powershell"
+ },
+ "Command Prompt": {
+ "path": [
+ "${env:windir}\\Sysnative\\cmd.exe",
+ "${env:windir}\\System32\\cmd.exe"
+ ],
+ "args": [],
+ "icon": "terminal-cmd"
+ },
+ "Git Bash": {
+ "source": "Git Bash"
+ }
+ },
+ "terminal.integrated.defaultProfile.windows": "Git Bash"
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 6c0e1e0..3892cb7 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,8 @@ This project is a POC( Proof of Concept ) targeting to become a base for native
# use
+
+Use the [bootstrap project](https://github.com/EPA-WG/custom-element-bootstrap) with all pre-configured or
## install
use via CDN
```html
@@ -56,17 +58,21 @@ npm i -P @epa-wg/custom-element
yarn add @epa-wg/custom-element
```
+## [enable IDE support](ide/IDE.md)
+
+
+
## [Live demo 🔗][demo-url]
```html
{title}
-
Smile as: {//smile}
-
+
@@ -205,12 +211,12 @@ In same way as in DCE itself:
```
## Attributes
-To be served by IDE and to track the attributes changes, they have to be declared via `xsl:param` syntax:
+To be served by IDE and to track the attributes changes, they have to be declared via `attribute`:
```html
- default_P1
-
-
+ default_P1
+
+
p1: {$p1} p2: {$p2} p3: {$p3}
@@ -229,7 +235,7 @@ i.e. slot `xxx` is matching `...` in payload.
description is not available
@@ -238,12 +244,12 @@ i.e. slot `xxx` is matching `...` in payload.
```
## loops, variables
-Loop implemented via [xsl:for-each](https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each)
+Loop implemented via [for-each](https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each)
[Variables in XSLT](https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/variable)
## [XPath](https://developer.mozilla.org/en-US/docs/Web/XSLT/Transforming_XML_with_XSLT/The_Netscape_XSLT_XPath_Reference)
-is available in `{}` in attributes, in `xsl:for-each`, `xsl:if`, `xsl:value-of`, and other XSL tags.
+is available in `{}` in attributes, in `for-each`, `if`, `value-of`, and other XSL tags.
XPath is a selector language to navigate over custom element instance data, attributes, and payload.
@@ -262,12 +268,12 @@ in template. In such cases the `xhtml:` prefix in front of troubled tag would so
-
+ {name()} {.}
-
+
@@ -302,7 +308,7 @@ run transformation under debugger.
* try to add as attribute you could observe and put the value of node name or text to identify the current location in data
within template
```xml
-xml tag name:
+xml tag name:
```
[git-url]: https://github.com/EPA-WG/custom-element
@@ -317,9 +323,9 @@ within template
[github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
[npm-image]: https://img.shields.io/npm/v/@epa-wg/custom-element.svg
[npm-url]: https://npmjs.org/package/@epa-wg/custom-element
-[coverage-image]: https://unpkg.com/@epa-wg/custom-element-test@0.0.17/coverage/coverage.svg
-[coverage-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.17/coverage/lcov-report/index.html
-[storybook-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.17/storybook-static/index.html?path=/story/welcome--introduction
+[coverage-image]: https://unpkg.com/@epa-wg/custom-element-test@0.0.18/coverage/coverage.svg
+[coverage-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.18/coverage/lcov-report/index.html
+[storybook-url]: https://unpkg.com/@epa-wg/custom-element-test@0.0.18/storybook-static/index.html?path=/story/welcome--introduction
[sandbox-url]: https://stackblitz.com/github/EPA-WG/custom-element?file=index.html
[webcomponents-url]: https://www.webcomponents.org/element/@epa-wg/custom-element
[webcomponents-img]: https://img.shields.io/badge/webcomponents.org-published-blue.svg
diff --git a/bin/xslDtd2Ide.mjs b/bin/xslDtd2Ide.mjs
new file mode 100644
index 0000000..1cc66ee
--- /dev/null
+++ b/bin/xslDtd2Ide.mjs
@@ -0,0 +1,160 @@
+/**
+ * node xslDtd2Ide.cjs
+ * would get xsl 1.0 schema and populate IntelliJ and VS Code IDE custom elements definitions
+ *
+ * This is one time use script as XSLT 1.0 schema is not changing.
+ * DTD parsing here is not generic and cobers only particula XSLT 1.0 schema.
+ */
+import { readFileSync, writeFileSync } from 'node:fs';
+
+
+const dtdText = await fetch( 'https://www.w3.org/1999/11/xslt10.dtd' )
+ .then( ( response ) => response.text() )
+ .then( ( body ) =>
+ {
+ return body;
+ } );
+const matches = dtdText.match( /<([^>]*)>/g );
+
+const chopOff = ( s, begin = 1, end = 1 ) => s.substring( begin, s.length - end );
+const trim = s => s?.trim ? s.trim() : s;
+
+let lastComment = ''
+const dtdObj = { ENTITY: {}, ELEMENT: {} }
+for( const match of matches ){
+ if( match.startsWith( '
-
+
-
-
+
+
@@ -152,14 +152,14 @@
}
}
-
+
-
+
-
+
-
-
+
+
diff --git a/demo/http-request.html b/demo/http-request.html
index c1396ea..60ac32f 100644
--- a/demo/http-request.html
+++ b/demo/http-request.html
@@ -43,18 +43,18 @@
method="GET"
header-accept="application/json"
>
- https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world
-
- https://unpkg.com/pokeapi-sprites@2.0.2/sprites/pokemon/other/dream-world
+
+
+ >
-
+
@@ -86,22 +86,22 @@