Search found 67 matches

by mlcook
Fri Feb 15, 2008 10:30 pm
Forum: XML Schemas
Topic: Count number of elements with a given attribute
Replies: 2
Views: 11136

Re: Count number of elements with a given attribute

Yes, I'm using xslt to process the xml.

Your solution, count(//Msg[@Direction='Send']), was just what I needed.

I've read about XPath axes, etc., but must not have seen enough examples, nor assimilated the general idea, so thanks for pointing me in this direction.

-- Mike
by mlcook
Fri Feb 15, 2008 7:19 pm
Forum: XML Schemas
Topic: Count number of elements with a given attribute
Replies: 2
Views: 11136

Count number of elements with a given attribute

In my xml file, I have several elements of the form (with contents omitted): <Msg Id="100" Direction="Send"/> <Msg Id="200" Direction="Send"/> <Msg Id="300" Direction="Receive"/> <Msg Id="400" Direction="Receive"/> I'd l...
by mlcook
Mon Feb 04, 2008 4:43 pm
Forum: XML Schemas
Topic: Want to define an Attribute as either String or Byte
Replies: 2
Views: 3962

Re: Want to define an Attribute as either String or Byte

Thanks for your suggestion and info on Relax NG.

Currently, our project is not using Relax NG, but that might be something to consider later on.

At least I know I wasn't overlooking something in schema definition, being somewhat new to all this.

Thanks again,
Mike Cook
by mlcook
Fri Feb 01, 2008 1:05 am
Forum: XML Schemas
Topic: Want to define an Attribute as either String or Byte
Replies: 2
Views: 3962

Want to define an Attribute as either String or Byte

After searching books and Internet, I can't see the solution to my problem. I'm hoping someone can provide a creative solution, or tell me it can't be done. I'd like to define an element with a required attribute which is either a xs:string or xs:byte. The attribute would have to have the same name,...
by mlcook
Thu Jan 24, 2008 11:18 pm
Forum: XSLT and FOP
Topic: How to remove unwanted whitespace from an XML element?
Replies: 4
Views: 9908

RE: How to remove unwanted whitespace from an XML element?

Dear jkmyoung,

Voilà!

Why not use a text handling template, indeed! As you may guess, I'm new to XSL. I've read about text() nodes, but not until now was I able to see more.

Your text() template did just what I needed! I knew there must be a simple way.

Thanks, Mike
by mlcook
Thu Jan 24, 2008 7:29 pm
Forum: XSLT and FOP
Topic: How to remove unwanted whitespace from an XML element?
Replies: 4
Views: 9908

RE: How to remove unwanted whitespace from an XML element?

Sorin, Thanks for the link about built-in templates. I still have my original problem even after adding the copy template you gave. This is some text for the paragraph. It has some formatting____________tags in it which I will process myself as I____________output the text of this message. This para...
by mlcook
Thu Jan 24, 2008 5:41 pm
Forum: XSLT and FOP
Topic: How to remove unwanted whitespace from an XML element?
Replies: 4
Views: 9908

How to remove unwanted whitespace from an XML element?

I'm using Oxygen 9.1 with Saxon 9B. I'm creating a Microsoft Word document from the contents of an XML file, using XSLT to process the XML elements and output WordprocessingML tags. Most of the transformation is going well, but I'm having trouble with mixed text in an element. An example XML element...