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

data-oninclude does not seem to work for data-include #67

Closed
fhirsch opened this issue Aug 23, 2012 · 1 comment
Closed

data-oninclude does not seem to work for data-include #67

fhirsch opened this issue Aug 23, 2012 · 1 comment

Comments

@fhirsch
Copy link
Contributor

fhirsch commented Aug 23, 2012

<html><head>....
<script src='http://dev.w3.org/2009/dap/ReSpec.js/js/lang/sh_xml.min.js' class='remove'></script>
<script src='http://www.w3.org/Tools/respec/respec-w3c-common' class='remove'></script>

<script> function showSchema(doc, content) {
// perform transformations to make it render and prettier
return '<pre class="dtd sh_xml">Schema Definition:' + doc._esc(content) + '</pre>';
}
</script>
...<html>
<body>
...
<div data-include='snippits/cryptobinary.xsd'
data-oninclude='showSchema'></div>
...

produces output

<div><simpletype name="CryptoBinary">
<restriction base="base64Binary">
</restriction>
</simpletype>
</div>

expected was

<pre class="dtd sh_xml">
Schema Definition:

<simpletype name="CryptoBinary">
  <restriction base="base64Binary">
  </restriction>
</simpletype>
</pre>

cryptobinary.xsd contains

<simpleType name="CryptoBinary">
  <restriction base="base64Binary">
  </restriction>
</simpleType>

The use of doc._esc might not be exactly correct but we should see a pre instead of a div in the output, no?

@fhirsch
Copy link
Contributor Author

fhirsch commented Aug 31, 2012

data-oninclude works fine, though I'd like to be able to pass parameters to the function.

@fhirsch fhirsch closed this as completed Aug 31, 2012
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this issue Feb 19, 2018
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this issue Feb 19, 2018
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