[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: handling tags and PIs within a macro

Subject: RE: handling tags and PIs within a macro
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 23 Oct 2007 12:04:39 -0400
RE:  handling tags and PIs within a macro
Nancy,

At 11:46 AM 10/23/2007, you wrote:
well, here is a problem: in the example you gave, you
have changed the order of the elements:

I just need to have dsc right after cmd, and that's
really important. How can I do that?

Actually, you don't need to have dsc right after cmd. (I know this since I know the rules of XML syntax.) Although you do have a problem.


Your schema allows 'dsc' as an attribute, but not as an element. (I was afraid of that.) So it has to have the syntax

<j_entry dsc="...contents..."/>

(the attribute sits on the j_entry start tag) rather than the syntax

<j_entry ...>
  <dsc>...</dsc>
</j_entry>

with its own tagging (as an element) appearing between the j_entry start- and end-tags.

Your choice at this point seems fairly stark:

1. Find another way to represent your information using tagging that is valid to the schema; or
2. Modify the schema to allow the tagging you need; or
3. Live without those "macro expansions" in the 'dsc' text.


Note: none of this is actually about XSLT at all! It is all about the syntax of XML and related issues such as schema conformance -- in other words, out of scope for this list!

Accordingly, I suggest that you need to take this up as an XML problem, not an XSLT problem. Probably the best option is to bring it up with someone in your organization who is in a position to help you learn the basics of XML syntax and document modeling, since that is clearly where the gap is here.

There are also plenty of books and resources on line to help you learn XML. And companies that offer courses, even (I'll be teaching such a course starting tomorrow).

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.