<?xml version="1.0" encoding="iso-8859-1"?>

<!-- file: xhtml-script-1.rng

     This is XHTML, a reformulation of HTML as a modular XML application.
     Copyright 1998-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved.
     Revision: $Id: xhtml-script-1.rng,v 1.1 2010/12/12 23:24:11 smccarro Exp $

     This RelaxNG module is identified by URI:
        
        http://www.w3.org/MarkUp/RELAXNG/xhtml-script-1.rng
     .................................................................... -->
<!-- Script Module -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<define name="xhtml.script">
  <element name="script">
    <ref name="xhtml.script.attlist"/>
    <text/>
  </element>
</define>

<define name="xhtml.script.attlist">
  <optional>
    <attribute name="charset">
      <ref name="xhtml.Charset.datatype"/>
    </attribute>
  </optional>
  <attribute name="type">
    <ref name="xhtml.ContentType.datatype"/>
  </attribute>
  <optional>
    <attribute name="src">
      <ref name="xhtml.URI.datatype"/>
    </attribute>
  </optional>
  <optional>
    <attribute name="defer">
      <value>defer</value>
    </attribute>
  </optional>
  <optional>
    <attribute name="xml:space">
      <value>preserve</value>
    </attribute>
  </optional>
</define>

<define name="xhtml.noscript">
  <element name="noscript">
    <ref name="xhtml.noscript.attlist"/>
    <ref name="xhtml.Block.model"/>
  </element>
</define>

<define name="xhtml.noscript.attlist">
  <ref name="xhtml.Common.attrib"/>
</define>

<define name="xhtml.head.content" combine="interleave">
  <zeroOrMore>
    <ref name="xhtml.script"/>
  </zeroOrMore>
</define>

<define name="xhtml.Script.class">
  <choice>
    <ref name="xhtml.noscript"/>
    <ref name="xhtml.script"/>
  </choice>
</define>

<define name="xhtml.Inline.class" combine="choice">
  <ref name="xhtml.Script.class"/>
</define>

<define name="xhtml.Block.class" combine="choice">
  <ref name="xhtml.Script.class"/>
</define>

</grammar>

