<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Oct 24, 2006, at 1:51 PM, Fred Drake wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On 10/24/06, Perry Smith &lt;<A href="mailto:pedz@easesoftware.com">pedz@easesoftware.com</A>&gt; wrote:</DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I am using nxml-mode in GNU emacs to edit the zcml files as well as page</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">template files.<SPAN class="Apple-converted-space">  </SPAN>I picked up the schema for zcml.<SPAN class="Apple-converted-space">  </SPAN>All that works fine.<SPAN class="Apple-converted-space">  </SPAN>Has</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">anyone done a schema for the metal and tal name spaces?</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I'm not aware of one being done.<SPAN class="Apple-converted-space">  </SPAN>This would be a welcome contribution.</DIV></BLOCKQUOTE></DIV><BR><DIV>I got up today ready to tackle this.  But, I may have succeeded by finding a trivial solution or I may have utterly failed.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>To quickly get to the gist, if you add the namespace definitions in the first tag, then the nxml-mode in emacs is content.  I have an example of this at the end of this note.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I bumped into two problems that stumped me.  First, it is general practice to do:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>&lt;metal:arbitrary_tag define-macro="page"&gt;</DIV><DIV>  ...</DIV><DIV>&lt;/metal:arbitrary_tag&gt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Second, metal and tal constructs are attributes that are placed inside any tag.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The schema specifications imply that things are very strict.  Zope and the key to the tag attributes is that these attributes can be put into the xml documents, effectively violate the base schemas, but since no one is checking, they produce the desired results.  (Also, I have not looked but probably by the time the document is sent out, all the tal and metal attributes have been stripped.)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So, to really do this properly, each schema that the tal or metal are going to be used in would need to be modified to allow the tal and metal attributes.  The RNC syntax does have a funny include construct that allows overriding constructs that are defined in the included file.  But, that only means that it would be possible to create a maintenance nightmare if someone wanted to do that.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Fortunately, the emacs checker is as simple as all the other checkers.  I discovered that I only need to change this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>&lt;metal:block</DIV><DIV>    define-macro="page"&gt;</DIV><DIV>  &lt;html</DIV><DIV>      xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"</DIV><DIV>      xml:lang="en"</DIV><DIV>      lang="en"&gt;</DIV><DIV> ...</DIV><DIV>  &lt;/html&gt;</DIV><DIV>&lt;/metal:block&gt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(which emacs does not like) To this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>&lt;metal:block</DIV><DIV>    xmlns:metal="<A href="http://xml.zope.org/namespaces/metal">http://xml.zope.org/namespaces/metal</A>"</DIV><DIV>    xmlns:tal="<A href="http://xml.zope.org/namespaces/tal">http://xml.zope.org/namespaces/tal</A>"</DIV><DIV>    define-macro="page"&gt;</DIV><DIV>  &lt;html</DIV><DIV>      xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"</DIV><DIV>      xml:lang="en"</DIV><DIV>      lang="en"&gt;</DIV><DIV> ...</DIV><DIV>  &lt;/html&gt;</DIV><DIV>&lt;/metal:block&gt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Which is probably a good idea anyhow.  Maybe the first example is frowned upon.  I got it from various tutorials.  But, as we can see, the namespace of metal and tal is never defined in the examples that I've been looking at.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I hope this helps.</DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Perry Smith</DIV><DIV>Ease Software, Inc.</DIV><DIV><A href="mailto:pedz@easesoftware.com">pedz@easesoftware.com</A></DIV><DIV><A href="http://www.easesoftware.com">http://www.easesoftware.com</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV></SPAN></SPAN>SATA Products for IBMs RS/6000, pSeries, and AIX systems<BR class="Apple-interchange-newline"></SPAN><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>