XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Eugene KirinSubject: Mapper
Author: Eugene Kirin
Date: 07 Dec 2004 12:33 PM
Hello!
Please explain me..
When I mapping one schema to another. I get the next xslt:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.eastview.com/xmlns/guide">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<guide_books>
<xsl:apply-templates select="a:guide_books/a:book"/>
</guide_books>
</xsl:template>
<xsl:template match="a:book">
<meta>
<xsl:attribute name="book-id">
<xsl:value-of select="a:guide_books/a:book/a:meta/@book-id"/>
</xsl:attribute>
</meta>
</xsl:template>
</xsl:stylesheet>

Please pay your attention that here is 2 templates (match="/" and match="a:book").
In template that matches on root(/) I apply match for "a:guide_books/a:book" and here is all right.
But in "a:book" template is a ploblem in "xsl:value-of" instruction. The "a:guide_books/a:book/a:meta/@book-id" value of select attribute is wrong.
Because select begins from "a:guide_books/..." instead of "/a:guide_books/...". Missed root(/) How can I fix this?

Postnext
Ivan PedruzziSubject: Mapper
Author: Ivan Pedruzzi
Date: 07 Dec 2004 03:07 PM
Hi Eugene,

Could you provide the schemas you are using so we can answer more properly?

Thank You
Ivan

Postnext
Eugene KirinSubject: Mapper
Author: Eugene Kirin
Date: 08 Dec 2004 05:44 AM
Originally Posted: 08 Dec 2004 04:19 AM
Yes, of course. I attached them. This schemas quite simple and differ from each other only elements (meta and source) position. In the old schema "meta" element goes after "source" element. In the new schema "meta" element goes before "source" element.


Documenteugene-schema-old(1).xsd
A schema mapping from

Documenteugene-schema-new(4).xsd
A schema mapping to

Posttop
Ivan PedruzziSubject: Mapper
Author: Ivan Pedruzzi
Date: 13 Dec 2004 07:28 PM
Eugene,

There is problem in what XSLT mapper geneartes in this particualr case.
The behavior has been fixed in the upcoming 6.1
Thank You for reporting this.

Ivan

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.