1 Reply Latest reply on Apr 9, 2008 12:43 PM by Matthew Sacks

    Weblogic 10 Grammar / Config objects

      I want to create a machine config.xml grammar file. In the content package https://www.bladelogic.com/community/entry!default.jspa?categoryID=7&externalID=964&fromSearchPage=true

      there are a number of Weblogic 8.1 config objects including a grammar file for parsing the config.xml.


      As far as I can see there is no content package for Weblogic 9/10 config.xml.

      The Weblogic 8.1 grammar files will work to parse a Weblogic 9/10 config.xml; however the xml schema definitions at the top are not included.


      I am trying to modify the Weblogic 8.1 grammar to include these xsd's but the configuration in the config.xml grammar doesn't follow what is in the grammar documentation (see attached) and they are all in the variables section (everything preceding the first %% - which is also confusing).


      Here are the contents of the Weblogic 8.1 machine config.xml grammar:


      1. Look at xml.gm on how to write this grammar

      2. Used to parse machine.config.xml


      IS_XML 1


      section D;name;;

      sectionGroup D;name;;

      add D;name,path,assembly,prefix,type,alias,key;;

      trustLevel D;name;;

      compiler D;language;;

      control D;name;;

      device D;name;;

      filter D;match,with;;case

      case D;match;1;

      use D;var;;

      channel D;id,ref;;

      formatter D;id;;









      Does anyone have any idea where these variable declarations come from or how I could modfify the Weblogic 8.1 grammar to include the xsd URLs for WLS 9/10?


      Also the standard xml.gm doesn't appear to have any declarations in it except IS_XML. This declaration is also not explained in the grammar documentation.




      1. this is a dummy grammar file for xml - this works if all the tags are unique


      IS_XML 1


      1. if there are duplicate nodes in the xml, then define a new grammar and

      2. associate the new grammar with that xml configuration file instead of using

      3. xml.gm for every xml file. To define a new grammar file for an xml file with

      4. duplicate nodes, use the example below.



      1. <servlet-name>invoker</servlet-name>

      2. <init-param>

      3. <param-name>debug</param-name>

      4. <param-value>0</param-value

      5. </init-param>

      6. <init-param>

      7. <param-name>logVerbosityLevel</param-name>

      8. <param-value>WARNING</param-value>

      9. </init-param>


      1. <servlet-name>jsp</servlet-name>

      2. <init-param>

      3. <param-name>logVerbosityLevel</param-name>

      4. <param-value>WARNING</param-value>

      5. </init-param>



      1. In the example above, "servlet" and "init-param" are duplicates. Now a

      2. duplcate node can be disambiguated by its attributes, text value or / and

      3. its children. So each duplicate node and each child that helps in

      4. disambiguate a duplicate have to be present with the following syntax:


      1. nodeName D/P;attributName[,attributeName];1/0;childName[,childName]


      1. All the duplicate nodes have "D" in the first column. If the attributes help

      2. in disambiguation then they are listed separated by commas in the second

      3. column. Otherwise this column can be left empty. If the text value is used in

      4. disambiguation, then the third column should contain 1 (otherwise it can left

      5. empty). If the children help in disambiguation then they are listed separated

      6. by commas in the fourth column. Otherwise this column can be left empty. Note

      7. that if a child helps disambiguating a parent, then it has to appear on a

      8. separate line. If the child unique by itself then its second column contains

      9. a "P" (as it is helping the parent) but it itself is a duplicate, it should

      10. contain a "D" in the second column.


      #servlet D;;;servlet-name

      #servlet-name P;;1;

      #init-param D;;;param-name

      #param-name P;;1;








      Message was edited by:

      Matthew Sacks