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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + XSLT How to include the '<' sy... (2)
-> - HELP: Functional XSLT Implemen... (1)
-> - Cannot find a matching 1-argum... (1)
-> - XSLT a:? (2)
-> ->XSLT a:?
-> + Attribute Value Concatenation (2)
-> - Why is the WYSIWYG xslt editor... (1)
-> + WebService Call Error: Ref ele... (4)
-> + How to replace value of a fiel... (2)
-> + Schema Validation Problems (3)
-> + Reusing a prior valid value in... (5)
-> + Clutching at straws! (2)
-> + Adding a number to a for each ... (2)
-> + Transform Name Value pairs int... (4)
-> + Transform the XML Scheme with ... (2)
-> + create XML drop down lists (2)
-> + error during stylesheet tutori... (3)
-> + Modify the value in a element ... (2)
-> + Call to extension function fai... (2)
-> + Convert XML Schema to XML - Mi... (2)
-> + How to calculate maximun RowCo... (3)
-- Previous [661-680] [681-700] [701-720] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Brandon dimperioSubject: XSLT a:?
Author: Brandon dimperio
Date: 09 Mar 2008 08:01 PM
Originally Posted: 09 Mar 2008 07:58 PM
so far for whatever reason I HAVE to use a: to access any elements of my document, I'm taking an XML class and we had 2 hours of information on XPath and 2 hours on XSLT and until I got ahold of stylus I couldn't manage to access anything other than copy of /

I haven't been able to find what this means anywhere on the internet, my assumption is it means ancestor?

I'm writing my code in the <xsl:template match="/"> section. should it be somewhere else so I don't have to use a:?

This is my XML doc up to the end of the DTD

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="transformers.xslt"?>
<!DOCTYPE orders2 [
<!ELEMENT orders2 (storeInfo,order+)>
<!ATTLIST orders2 xmlns CDATA #REQUIRED>
<!ELEMENT storeInfo (storename,location)>
<!ELEMENT storename (#PCDATA)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT order (date,discount?,orderItem+)>
<!ELEMENT date (#PCDATA) >
<!ELEMENT discount (#PCDATA)>
<!ELEMENT orderItem (costper,quantity,product)>
<!ELEMENT costper (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT product (#PCDATA)>
]>

in the xslt I have to do the following to procduce data:

<xsl:for-each select="a:orders2/a:order">

or <xsl:value-of select="a:date"/>

Posttop
James DurningSubject: XSLT a:?
Author: James Durning
Date: 10 Mar 2008 11:16 AM
Originally Posted: 10 Mar 2008 11:15 AM
This is a namespace prefix. If your xml document has xmlns="somewebsite.com", you have to specfically use that url in your xsl as well. eg. xmlns:a="somewebsite.com" then find a:someelement.



http://www.thescripts.com/forum/thread768835.html

   
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.