Re: [xsl] understanding attributes and predicates

Subject: Re: [xsl] understanding attributes and predicates
From: Terry Ofner <tofner@xxxxxxxxxxx>
Date: Fri, 1 Feb 2008 16:11:50 -0500
Colin,

Just so I understand the not and DON'T structure of your explanation.

Colin> You are not matching the par elements which DON'T have a
Colin> class="stem_mc' attribute. So these get matched by the
Colin> built-in templates, which just write the text nodes.


My second template is outputting the elements that DON'T have a class="stem_mc" attributes. Why is it doing that? (Don't answer that. I am asking myself that question.)

I am using saxon8. Is this the command-line option I would use?

-vw Treat validation errors on result document as warnings

Terry


Terry Ofner 1541 Northbrook Drive Indianapolis, IN 46260 Voice: 317-870-1992 Fax: 317-870-7101

tofner@xxxxxxxxxxx




On Feb 1, 2008, at 1:29 PM, Colin Paul Adams wrote:


"Colin" == Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> writes:

Terry> I just wonder what is going on. Is it the "for-each Terry> select='@*'" or the "value-of select="." that is returning Terry> the text node of the par element?

Colin> No.

    Colin> You are not matching the par elements which DON'T have a
    Colin> class="stem_mc' attribute. So these get matched by the
    Colin> built-in templates, which just write the text nodes.

Since you are exploring, you might find a couple of the gestalt
command-line options useful:

--suppress-default-action (which makes the processor non-conformant)
  would cause your transformation to fail.

This would alert you to the use of default template matching. Then you
could instead use:

--default-template-warning, to find out what was going on. I get this
  output for your transformation:
Warning: Default template invoked for document-node()
TODO: {XM_XPATH_TREE_ELEMENT}.type_name is only partly written
(hm. I've just found a bug!)

Warning: Default template invoked for element(document,
Warning: Default template invoked for text()
Warning: Default template invoked for element(part,
Warning: Default template invoked for text()
Warning: Default template invoked for element(par,
Warning: Default template invoked for text()
<?xml version="1.0" encoding="UTF-8"?>


Unit 1: Vocabulary SkillsWarning: Default template invoked for text()


    Warning: Default template invoked for element(par,
Warning: Default template invoked for text()
PosttestWarning: Default template invoked for text()

    Warning: Default template invoked for element(section,
Warning: Default template invoked for text()

      Warning: Default template invoked for element(heading,
Warning: Default template invoked for text()


attribute name: class attribute value: stem_mcWarning: Default template invoked for text()

Warning: Default template invoked for element(par,
Warning: Default template invoked for text()
The threat of rain makes i. . .Warning: Default template invoked for text()


      Warning: Default template invoked for element(par,
Warning: Default template invoked for text()
doubtfulWarning: Default template invoked for text()

      Warning: Default template invoked for element(par,
Warning: Default template invoked for text()
likelyWarning: Default template invoked for text()

      Warning: Default template invoked for element(par,
No more warnings will be displayed
hopeful
      obvious
      A
      G5U1S5




;Describe the connotation of the word mutt and 8xplain whether it is positive or negative. Answers will vary. Possible answer: The word mutt has the negative connotation of a dog that isn$(B!G(Bt worth very much or that isn$(B!G(Bt good-looking. G5U1S8




-- Colin Adams Preston Lancashire

Current Thread