Loading ...
Sorry, an error occurred while loading the content.

How to use both "xsl" and "fo" namespaces together in nXML

Expand Messages
  • jdputsch2
    Howdy, I ve got nXML configured such that if I edit a document foo.xsl , the XSLT schema is used. If I enter
    Message 1 of 2 , Nov 22, 2010
    • 0 Attachment
      Howdy,

      I've got nXML configured such that if I edit a document "foo.xsl", the "XSLT" schema is used.

      If I enter "<xsl:" and hit C-return, then I get the expect completion prompts/action from nXML.

      Likewise if I edit a document "foo.fo", then the "FO" (for XSL-FO) schema is used.

      If I enter "<fo:" and hit C-return, then I get the expected completion prompts/action from nXML.

      The problem I'm having is I'd like to be able to develop XSLT stylesheets that transform XML to XML-FO and therefore would be using the XSLT schema in nXML. When I do this I cannot figure out how to configure the relaxNG schemas such that I get a schema that lets me have BOT "<xsl:" and "<fo:" namespaces get functional completion working.

      The smallest sample document I can show to illustrate what I mean is this one:

      =====
      <?xml version="1.0" encoding="utf-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:fo="http://www.w3.org/1999/XSL/Format"
      version="2.0">

      <xsl:template match="/">
      <fo:root font-family="Times" font-size="8pt">

      <fo: <====== C-return HERE

      </fo:root>

      </xsl:template>

      </xsl:stylesheet>

      =====

      For the above document <xsl: elements are completed and prompted for. If I hit C-return at the location indicated I get a 'no completion for "fo:"' message.

      How can I configure the relaxNG schemas allowing me to get BOTH namespace completing simultaneously in one file?

      I am evaluating EditX for just this reason, but I find it much less productive than Emacs/nXML (except for the whole completion problem).

      Any help will be greatly appreciated.

      Jeff.
    • Dave Pawson
      ... Two options. Integrate the fo language into the xslt schema Allow any in the xslt schema where any fo element can go Or Just accept that you can t have
      Message 2 of 2 , Nov 23, 2010
      • 0 Attachment
        On 23 November 2010 03:48, jdputsch2 <jdputsch@...> wrote:

        > The problem I'm having is I'd like to be able to develop XSLT stylesheets that transform XML to XML-FO and therefore would be using the XSLT schema in nXML. When I do this I cannot figure out how to configure the relaxNG schemas such that I get  a schema that lets me have BOT "<xsl:" and "<fo:" namespaces get functional completion working.

        Two options.
        Integrate the fo language into the xslt schema
        Allow any in the xslt schema where any fo element can go

        Or
        Just accept that you can't have what you want easily.

        Since you are mainly using xslt, use that schema,
        then validate the fo output using another validator such as Jing.

        HTH






        --
        Dave Pawson
        XSLT XSL-FO FAQ.
        Docbook FAQ.
        http://www.dpawson.co.uk
      Your message has been successfully submitted and would be delivered to recipients shortly.