xsl-list
[Top] [All Lists]

RE: How to select a document element from the input xml fileusing xslt?

2004-07-12 13:51:01
When I implemented it this way:

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform";  version="1.0"
xmlns:xsl="dummy">
        <namespace-alias stylesheet-prefix="xsl" result-prefix=""/>

....
And then debug, I got an "unexpected value" error at the line 
<namespace-alias stylesheet-prefix="xsl" result-prefix=""/>

What is wrong?

Thank you, 

Alla Belkin 
abelkin(_at_)carlson(_dot_)com     


-----Original Message-----
From: George Cristian Bina [mailto:george(_at_)sync(_dot_)ro] 
Sent: Monday, July 12, 2004 2:32 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] How to select a document element from the input xml
fileusing xslt?

The way to accomplish what you are
trying to do is to use the <xsl:element name="xsl:output"> and then
add
the
necessary attributes using <xsl:attribute
name="method">xml</xsl:attribute> etc...

To easily generate XSLT code you can use the namespace-alias in your
first
stylesheet like below:

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform";  version="1.0"
xmlns:xsl="dummy">
  <namespace-alias stylesheet-prefix="xsl" result-prefix=""/>
  <template match="/">
    <xsl:stylesheet version="1.0">
      <choose>
        <when test="count(//Delete)  &gt; 0">
          <xsl:output method="xml" doctype-system="http://delete.dtd"/>
        </when>
        <when test="count(//Delete) = 0">
          <xsl:output method="xml" doctype-system="http://update.dtd"/>
        </when>
      </choose>

      <!-- the rest of your stylesheet here... -->
      <xsl:template match="/">

      </xsl:template>

    </xsl:stylesheet>
  </template>
</stylesheet>

Best Regards,
George
-------------------------------------------------------
George Cristian Bina mailto:george(_at_)oxygenxml(_dot_)com
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/




--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--



<Prev in Thread] Current Thread [Next in Thread>